Commit a2980d5f authored by Alexandros Georgantas's avatar Alexandros Georgantas

Clean-up of the central modal mechanism

parent 4247ac2e
Pipeline #3471 failed with stage
in 1 minute and 47 seconds
......@@ -3,22 +3,17 @@ 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 ApplicationWithModal from 'pubsweet-component-universal-modal/ApplicationWithModal'
import config from 'config'
const Root = ({ store, history, routes, theme }) => {
const { withModal } = config['pubsweet-client']
let app
if (withModal) {
app = (
<div>
{routes}
<ModalContainer />
</div>
)
} else {
app = { routes }
}
const app = withModal ? (
<ApplicationWithModal>{routes}</ApplicationWithModal>
) : (
{ routes }
)
return (
<Provider store={store}>
<ConnectedRouter history={history}>
......
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