2020-12-31 03:06:16 +09:00
|
|
|
import React from 'react';
|
|
|
|
import ReactDom from 'react-dom';
|
2021-01-05 17:42:41 +09:00
|
|
|
import {BrowserRouter, Route, Switch as RouterSwitch} from 'react-router-dom';
|
2021-01-05 04:02:43 +09:00
|
|
|
import {Headline} from './headline';
|
|
|
|
import {Gallery} from './gallery';
|
2021-01-05 17:42:41 +09:00
|
|
|
import {ContentInfo} from './contentinfo';
|
2021-01-05 04:02:43 +09:00
|
|
|
|
2021-01-05 17:42:41 +09:00
|
|
|
import '../css/style.css';
|
2021-01-05 04:02:43 +09:00
|
|
|
|
2021-01-05 17:42:41 +09:00
|
|
|
const FooProfile = ()=><div>test profile</div>;
|
2021-01-05 04:02:43 +09:00
|
|
|
const App = ()=> (
|
|
|
|
<BrowserRouter>
|
|
|
|
<Headline>
|
2021-01-05 17:42:41 +09:00
|
|
|
<RouterSwitch>
|
|
|
|
<Route path="/" exact component={Gallery}></Route>
|
|
|
|
<Route path="/content" component={ContentInfo}>
|
|
|
|
</Route>
|
|
|
|
<Route path="/profile" component={FooProfile}>
|
|
|
|
</Route>
|
|
|
|
<Route>
|
|
|
|
<div>404 Not Found</div>
|
|
|
|
</Route>
|
|
|
|
</RouterSwitch>
|
2021-01-05 04:02:43 +09:00
|
|
|
</Headline>
|
|
|
|
</BrowserRouter>
|
|
|
|
);
|
2020-12-31 03:06:16 +09:00
|
|
|
|
|
|
|
ReactDom.render(
|
2021-01-05 04:02:43 +09:00
|
|
|
<App/>,
|
2020-12-31 03:06:16 +09:00
|
|
|
document.getElementById("root")
|
|
|
|
)
|