Commit 4247ac2e authored by Alexandros Georgantas's avatar Alexandros Georgantas
Browse files

Initial commit for modal functionality

parent 83b12bd9
Pipeline #3412 failed with stage
in 1 minute and 35 seconds
......@@ -3,14 +3,30 @@ import { ConnectedRouter } from 'react-router-redux'
import { Provider } from 'react-redux'
import PropTypes from 'prop-types'
import { ThemeProvider } from 'react-css-themr'
import ModalContainer from 'pubsweet-component-universal-modal/ModalContainer'
import config from 'config'
const Root = ({ store, history, routes, theme }) => (
<Provider store={store}>
<ConnectedRouter history={history}>
<ThemeProvider theme={theme}>{routes}</ThemeProvider>
</ConnectedRouter>
</Provider>
)
const Root = ({ store, history, routes, theme }) => {
const { withModal } = config['pubsweet-client']
let app
if (withModal) {
app = (
<div>
{routes}
<ModalContainer />
</div>
)
} else {
app = { routes }
}
return (
<Provider store={store}>
<ConnectedRouter history={history}>
<ThemeProvider theme={theme}>{app}</ThemeProvider>
</ConnectedRouter>
</Provider>
)
}
Root.propTypes = {
routes: PropTypes.node.isRequired,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment