2018-03-29 09:05:42 +00:00
|
|
|
// @flow
|
2018-03-12 08:30:03 +00:00
|
|
|
import 'babel-polyfill'
|
2018-03-29 09:52:58 +00:00
|
|
|
|
2018-03-08 09:04:12 +00:00
|
|
|
import { MuiThemeProvider } from 'material-ui/styles'
|
2018-03-01 08:05:56 +00:00
|
|
|
import React from 'react'
|
|
|
|
import ReactDOM from 'react-dom'
|
2018-03-29 09:05:42 +00:00
|
|
|
import { Provider } from 'react-redux'
|
2018-03-29 09:52:58 +00:00
|
|
|
import { ConnectedRouter } from 'react-router-redux'
|
2018-04-11 07:28:54 +00:00
|
|
|
import PageFrame from '~/components/layout/PageFrame'
|
2018-03-29 09:52:58 +00:00
|
|
|
import { history, store } from '~/store'
|
2018-03-08 09:04:12 +00:00
|
|
|
import theme from '~/theme/mui'
|
2018-03-29 09:05:42 +00:00
|
|
|
import AppRoutes from '~/routes'
|
2018-06-07 20:10:10 +00:00
|
|
|
import fetchSafes from '~/routes/safe/store/actions/fetchSafes'
|
|
|
|
|
2018-03-29 09:05:42 +00:00
|
|
|
import './index.scss'
|
|
|
|
|
2018-06-07 20:10:10 +00:00
|
|
|
store.dispatch(fetchSafes())
|
|
|
|
|
2018-03-02 16:53:50 +00:00
|
|
|
const Root = () => (
|
2018-03-29 09:05:42 +00:00
|
|
|
<Provider store={store}>
|
|
|
|
<MuiThemeProvider theme={theme}>
|
|
|
|
<ConnectedRouter history={history}>
|
2018-04-11 07:28:54 +00:00
|
|
|
<PageFrame>
|
|
|
|
<AppRoutes />
|
|
|
|
</PageFrame>
|
2018-03-29 09:05:42 +00:00
|
|
|
</ConnectedRouter>
|
|
|
|
</MuiThemeProvider>
|
|
|
|
</Provider>
|
2018-03-02 16:53:50 +00:00
|
|
|
)
|
2018-03-01 08:05:56 +00:00
|
|
|
|
|
|
|
ReactDOM.render(
|
2018-03-02 16:53:50 +00:00
|
|
|
<Root />,
|
2018-03-12 08:30:03 +00:00
|
|
|
document.getElementById('root'),
|
|
|
|
)
|