diff options
Diffstat (limited to 'frontend/src/routes.js')
-rw-r--r-- | frontend/src/routes.js | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/frontend/src/routes.js b/frontend/src/routes.js index 6fd60c04..e49a7e2c 100644 --- a/frontend/src/routes.js +++ b/frontend/src/routes.js @@ -1,42 +1,42 @@ -import { fork } from 'redux-saga/effects' -import homeSaga from './sagas/home' -import gameBrowserSaga from './sagas/gameBrowser' -import lobbySaga from './sagas/lobby' +import { fork } from "redux-saga/effects"; +import homeSaga from "./sagas/home"; +import gameBrowserSaga from "./sagas/gameBrowser"; +import lobbySaga from "./sagas/lobby"; + +import { HomeLayout, LobbyLayout } from "./layouts"; +import HomePage from "./containers/home"; +import GameBrowser from "./containers/gameBrowser"; +import Lobby from "./containers/lobby"; +import Error404 from "./components/errors/Error404"; export const makeSagaRoutes = wsConnection => ({ - *'/'() { - yield fork(homeSaga, wsConnection) + *"/"() { + yield fork(homeSaga, wsConnection); }, - *'/games'() { - yield fork(gameBrowserSaga, wsConnection) + *"/games"() { + yield fork(gameBrowserSaga, wsConnection); }, - *'/lobby/*'() { - yield fork(lobbySaga, wsConnection) + *"/lobby/*"() { + yield fork(lobbySaga, wsConnection); } -}) - -import { HomeLayout, LobbyLayout } from './layouts' -import HomePage from './containers/home' -import GameBrowser from './containers/gameBrowser' -import Lobby from './containers/lobby' -import Error404 from './components/errors/Error404' +}); export const routes = [ { - path: '/', + path: "/", component: HomeLayout, indexRoute: { component: HomePage } }, { - path: '/', + path: "/", component: LobbyLayout, childRoutes: [ - { path: '/games', component: GameBrowser }, - { path: '/lobby/*', component: Lobby } + { path: "/games", component: GameBrowser }, + { path: "/lobby/*", component: Lobby } ] }, { - path: '*', - component: Error404, + path: "*", + component: Error404 } -] +]; |