Skip to content

Commit

Permalink
feat(routes): add some routes
Browse files Browse the repository at this point in the history
  • Loading branch information
kiki-le-singe committed Dec 2, 2016
1 parent 60f9e86 commit 040daf1
Showing 1 changed file with 10 additions and 18 deletions.
28 changes: 10 additions & 18 deletions src/common/routes/index.jsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,16 @@
import React from 'react'
import { Route, IndexRoute } from 'react-router'
import { Route, IndexRoute, Redirect } from 'react-router'

import App from '../layouts/App'
import Home from '../views/Home'

// export default function createRoutes() {
// return {
// component: App,
// childRoutes: [
// {
// path: '/',
// component: require('../views/Home').default,
// },
// ],
// }
// }
import AppLayout from 'common/layouts/AppLayout'
import HomeView from 'common/views/HomeView'
import AboutView from 'common/views/AboutView'
import HelloView from 'common/views/HelloView'

export default (
<Route path="/" component={App}>
<IndexRoute component={Home} />
<Route path="home" component={Home} />
<Route path="/" component={AppLayout}>
<IndexRoute component={HomeView} />
<Route path="hello" component={HelloView} />
<Route path="about" component={AboutView} />
<Redirect from="*" to="hello" />
</Route>
)

0 comments on commit 040daf1

Please sign in to comment.