Created
July 11, 2018 17:02
-
-
Save itto-ki/8a2c3c2ffc1b51ae382e9e1a297bc2de to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import { ConnectedRouter } from 'connected-react-router' | |
import { Route, Switch } from 'react-router-dom' | |
import TopBar from './TopBar' | |
import ArticleList from '../containers/ArticleList' | |
import Creator from '../containers/Creator' | |
const App = ({history}) => ( | |
<div> | |
<ConnectedRouter history={history}> | |
<div> | |
<TopBar /> | |
<Switch> | |
<Route exact path='/' component={ArticleList} /> | |
<Route path='/new' component={Creator} /> | |
</Switch> | |
</div> | |
</ConnectedRouter> | |
</div> | |
) | |
export default App |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment