diff options
Diffstat (limited to 'frontend/src/routes.js')
-rw-r--r-- | frontend/src/routes.js | 49 |
1 files changed, 29 insertions, 20 deletions
diff --git a/frontend/src/routes.js b/frontend/src/routes.js index b87977ef..60efed8d 100644 --- a/frontend/src/routes.js +++ b/frontend/src/routes.js @@ -1,23 +1,32 @@ // @flow -import { HomeLayout, LobbyLayout } from './layouts'; -import GameBrowser from './containers/gameBrowser'; -import HomePage from './containers/home'; -import Lobby from './containers/lobby'; +import React from 'react'; + +import Application from './scenes'; import Error404 from './components/errors/Error404'; -export const routes = [ - { - path: '/', - component: HomeLayout, - indexRoute: { component: HomePage }, - }, - { - path: '/', - component: LobbyLayout, - childRoutes: [{ path: '/games', component: GameBrowser }, { path: '/lobby/*', component: Lobby }], - }, - { - path: '*', - component: Error404, - }, -]; +import { Route, Switch } from 'react-router'; + +const Routes = () => ( + <Switch> + <Route path="/" component={Application} /> + <Route path="*" component={Error404} /> + </Switch> +); + +export default Routes; +// export const routes = [ +// { +// path: '/', +// component: HomeLayout, +// indexRoute: { component: HomePage }, +// }, +// { +// path: '/', +// component: LobbyLayout, +// childRoutes: [{ path: '/games', component: GameBrowser }, { path: '/lobby/*', component: Lobby }], +// }, +// { +// path: '*', +// component: Error404, +// }, +// ]; |