mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-04-24 19:59:12 +00:00
36 lines
888 B
JavaScript
36 lines
888 B
JavaScript
import React, { Component } from 'react'
|
|
import { Provider } from 'react-redux'
|
|
import { DragDropContext } from 'react-dnd'
|
|
import HTML5Backend from 'react-dnd-html5-backend'
|
|
import configureStore from './store/configureStore'
|
|
import './App.css'
|
|
import './generic.sass'
|
|
import { Router } from 'react-router-dom'
|
|
import Wrapper from './components/wrapper'
|
|
import AppRouter from './router'
|
|
import { userInit } from './actions'
|
|
import { history } from './router/history'
|
|
|
|
const store = configureStore(undefined)
|
|
|
|
window.__APP_STORE__ = store
|
|
|
|
class _App extends Component {
|
|
componentDidMount() {
|
|
store.dispatch(userInit)
|
|
}
|
|
|
|
render() {
|
|
return (
|
|
<Provider store={store}>
|
|
<Router history={history}>
|
|
<Wrapper>
|
|
<AppRouter />
|
|
</Wrapper>
|
|
</Router>
|
|
</Provider>
|
|
)
|
|
}
|
|
}
|
|
|
|
export default DragDropContext(HTML5Backend)(_App)
|