-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.js
25 lines (23 loc) · 873 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
import {Provider} from 'mobx-react';
import AppStore from './stores/appstore';
import trans from './stores/translations';
import Firebase from './stores/firebase';
import { createBrowserHistory } from 'history';
const pathname = window.location.pathname;
let basename = false;
if (pathname.indexOf('macrogen') >= 0) basename = '/macrogen';
const history = new createBrowserHistory({
basename: basename
});
const firebaseClass = new Firebase();
const appstore = new AppStore(firebaseClass, history, trans);
ReactDOM.render(
<Provider app={appstore} fb={firebaseClass} s={trans} >
<App app={appstore} history={history} />
</Provider>, document.getElementById('root'));
registerServiceWorker();