Created
November 23, 2016 21:10
-
-
Save 4knort/30acd4b6f42e5395c49e36a358a9f0f5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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, { PropTypes } from 'react'; | |
import { Route, IndexRoute } from 'react-router'; | |
import { HotRouter } from 'utils'; | |
import { IndexPage, UserPage } from 'pages'; | |
import AppContainer from 'components/AppContainer'; | |
const AppRouter = ({ history }) => ( | |
<HotRouter history={history}> | |
<Route path="/" component={AppContainer}> | |
<IndexRoute component={IndexPage} /> | |
<Route path="user/:id" component={UserPage} /> | |
</Route> | |
</HotRouter> | |
); | |
AppRouter.propTypes = { history: PropTypes.object.isRequired }; | |
export default AppRouter; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment