diff options
Diffstat (limited to 'src/app.jsx')
-rw-r--r-- | src/app.jsx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/app.jsx b/src/app.jsx index db0dee392..87297c664 100644 --- a/src/app.jsx +++ b/src/app.jsx | |||
@@ -2,8 +2,8 @@ import { webFrame } from 'electron'; | |||
2 | 2 | ||
3 | import { render } from 'react-dom'; | 3 | import { render } from 'react-dom'; |
4 | import { Provider } from 'mobx-react'; | 4 | import { Provider } from 'mobx-react'; |
5 | import { syncHistoryWithStore, RouterStore } from 'mobx-react-router'; | 5 | import { RouterStore } from '@superwf/mobx-react-router'; |
6 | import { hashHistory } from 'react-router'; | 6 | import { createHashHistory } from 'history'; |
7 | 7 | ||
8 | import ServerApi from './api/server/ServerApi'; | 8 | import ServerApi from './api/server/ServerApi'; |
9 | import LocalApi from './api/server/LocalApi'; | 9 | import LocalApi from './api/server/LocalApi'; |
@@ -14,7 +14,7 @@ import MenuFactory from './lib/Menu'; | |||
14 | import TouchBarFactory from './lib/TouchBar'; | 14 | import TouchBarFactory from './lib/TouchBar'; |
15 | 15 | ||
16 | import I18N from './I18n'; | 16 | import I18N from './I18n'; |
17 | import Routes from './routes'; | 17 | import FerdiumRoutes from './routes'; |
18 | 18 | ||
19 | // Basic electron Setup | 19 | // Basic electron Setup |
20 | webFrame.setVisualZoomLevelLimits(1, 1); | 20 | webFrame.setVisualZoomLevelLimits(1, 1); |
@@ -22,9 +22,9 @@ webFrame.setVisualZoomLevelLimits(1, 1); | |||
22 | window.addEventListener('load', () => { | 22 | window.addEventListener('load', () => { |
23 | const serverApi = new ServerApi(); | 23 | const serverApi = new ServerApi(); |
24 | const api = apiFactory(serverApi, new LocalApi()); | 24 | const api = apiFactory(serverApi, new LocalApi()); |
25 | const router = new RouterStore(); | 25 | const history = createHashHistory(); |
26 | const router = new RouterStore(history); | ||
26 | const stores = storeFactory(api, actions, router); | 27 | const stores = storeFactory(api, actions, router); |
27 | const history = syncHistoryWithStore(hashHistory, router); | ||
28 | const menu = new MenuFactory(stores, actions); | 28 | const menu = new MenuFactory(stores, actions); |
29 | const touchBar = new TouchBarFactory(stores, actions); | 29 | const touchBar = new TouchBarFactory(stores, actions); |
30 | 30 | ||
@@ -39,7 +39,7 @@ window.addEventListener('load', () => { | |||
39 | const preparedApp = ( | 39 | const preparedApp = ( |
40 | <Provider stores={stores} actions={actions}> | 40 | <Provider stores={stores} actions={actions}> |
41 | <I18N stores={{ app: stores.app, user: stores.user }}> | 41 | <I18N stores={{ app: stores.app, user: stores.user }}> |
42 | <Routes history={history} /> | 42 | <FerdiumRoutes history={history} /> |
43 | </I18N> | 43 | </I18N> |
44 | </Provider> | 44 | </Provider> |
45 | ); | 45 | ); |