diff options
Diffstat (limited to 'ui/app/root.js')
-rw-r--r-- | ui/app/root.js | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/ui/app/root.js b/ui/app/root.js index 21d6d1829..64f365c9e 100644 --- a/ui/app/root.js +++ b/ui/app/root.js @@ -1,22 +1,28 @@ -const inherits = require('util').inherits -const Component = require('react').Component -const Provider = require('react-redux').Provider +const { Component } = require('react') +const PropTypes = require('prop-types') +const { Provider } = require('react-redux') const h = require('react-hyperscript') const SelectedApp = require('./select-app') +const { HashRouter } = require('react-router-dom') -module.exports = Root - -inherits(Root, Component) -function Root () { Component.call(this) } - -Root.prototype.render = function () { - return ( +class Root extends Component { + render () { + const { store } = this.props - h(Provider, { - store: this.props.store, - }, [ - h(SelectedApp), - ]) + return ( + h(Provider, { store }, [ + h(HashRouter, { + hashType: 'noslash', + }, [ + h(SelectedApp), + ]), + ]) + ) + } +} - ) +Root.propTypes = { + store: PropTypes.object, } + +module.exports = Root |