2017-11-29 05:24:35 +01:00
|
|
|
const { Component } = require('react')
|
|
|
|
const PropTypes = require('prop-types')
|
|
|
|
const { Provider } = require('react-redux')
|
2016-04-14 00:28:44 +02:00
|
|
|
const h = require('react-hyperscript')
|
2019-01-30 15:16:40 +01:00
|
|
|
const { HashRouter } = require('react-router-dom')
|
|
|
|
const App = require('./app')
|
|
|
|
const I18nProvider = require('./i18n-provider')
|
2016-04-14 00:28:44 +02:00
|
|
|
|
2017-11-29 05:24:35 +01:00
|
|
|
class Root extends Component {
|
|
|
|
render () {
|
|
|
|
const { store } = this.props
|
2016-06-21 22:18:32 +02:00
|
|
|
|
2017-11-29 05:24:35 +01:00
|
|
|
return (
|
|
|
|
h(Provider, { store }, [
|
2019-01-30 15:16:40 +01:00
|
|
|
h(HashRouter, {
|
|
|
|
hashType: 'noslash',
|
|
|
|
}, [
|
|
|
|
h(I18nProvider, [
|
|
|
|
h(App),
|
|
|
|
]),
|
|
|
|
]),
|
2017-11-29 05:24:35 +01:00
|
|
|
])
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
2016-04-14 00:28:44 +02:00
|
|
|
|
2017-11-29 05:24:35 +01:00
|
|
|
Root.propTypes = {
|
|
|
|
store: PropTypes.object,
|
2016-04-14 00:28:44 +02:00
|
|
|
}
|
2017-11-29 05:24:35 +01:00
|
|
|
|
|
|
|
module.exports = Root
|