Skip to content
Snippets Groups Projects
Commit 1dcf70a8 authored by Alexandros Georgantas's avatar Alexandros Georgantas
Browse files

refactor(app): modals

parent c8589300
No related branches found
No related tags found
1 merge request!15File upload
// import 'regenerator-runtime/runtime'
// import React from 'react'
// import ReactDOM from 'react-dom'
// import { configureStore, Root } from 'pubsweet-client'
// import { AppContainer } from 'react-hot-loader'
// import createHistory from 'history/createBrowserHistory'
// import theme from './theme'
// import routes from './routes'
// const history = createHistory()
// const store = configureStore(history, {})
// const rootEl = document.getElementById('root')
// ReactDOM.render(
// <AppContainer>
// <Root history={history} routes={routes} store={store} theme={theme} />
// </AppContainer>,
// rootEl,
// )
// if (module.hot) {
// module.hot.accept('pubsweet-client/src/components/Root', () => {
// // eslint-disable-next-line global-require
// const NextRoot = require('pubsweet-client/src/components/Root').default
// ReactDOM.render(
// <AppContainer>
// <NextRoot history={history} routes={routes} store={store} />
// </AppContainer>,
// rootEl,
// )
// })
// }
import 'regenerator-runtime/runtime'
import React from 'react'
......@@ -47,18 +7,33 @@ import { hot } from 'react-hot-loader'
import createHistory from 'history/createBrowserHistory'
import { Root } from 'pubsweet-client'
// Modals
import ModalProvider from 'editoria-common/src/ModalProvider'
import AddBookModal from 'pubsweet-component-editoria-dashboard/src/modals/AddBookModal'
import DeleteBookModal from 'pubsweet-component-editoria-dashboard/src/modals/DeleteBookModal'
import ArchiveBookModal from 'pubsweet-component-editoria-dashboard/src/modals/ArchiveBookModal'
import DeleteBookComponentModal from 'pubsweet-component-bookbuilder/src/ui/src/modals/DeleteBookComponentModal'
import BookTeamManagerModal from 'pubsweet-component-bookbuilder/src/TeamManager/ConnectedTeamManager'
import theme from './theme'
import routes from './routes'
console.log('the', theme)
const history = createHistory()
const modals = {
addBook: AddBookModal,
deleteBook: DeleteBookModal,
archiveBook: ArchiveBookModal,
deleteBookComponent: DeleteBookComponentModal,
bookTeamManager: BookTeamManagerModal,
}
const rootEl = document.getElementById('root')
ReactDOM.render(
<Root history={history} routes={routes} theme={theme} />,
<ModalProvider modals={modals}>
<Root history={history} routes={routes} theme={theme} />
</ModalProvider>,
rootEl,
)
......
......@@ -6557,6 +6557,11 @@ execall@^1.0.0:
dependencies:
clone-regexp "^1.0.0"
 
exenv@^1.2.0:
version "1.2.2"
resolved "https://registry.yarnpkg.com/exenv/-/exenv-1.2.2.tgz#2ae78e85d9894158670b03d47bec1f03bd91bb9d"
integrity sha1-KueOhdmJQVhnCwPUe+wfA72Ru50=
exit-hook@^1.0.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8"
......@@ -7181,6 +7186,21 @@ formik@^1.4.2:
tiny-warning "^1.0.2"
tslib "^1.9.3"
 
formik@^1.5.1:
version "1.5.2"
resolved "https://registry.yarnpkg.com/formik/-/formik-1.5.2.tgz#bb46853f10433f6f0a83415122c2a8e7e2e285fc"
integrity sha512-gVrNN4OmxvtwV4IvoyQJk797D3ptl3X8C1lJjbOBX48EFxxFTzchtUX5XiDSmhMIhtsg2rahT41VEbZPpgM6lQ==
dependencies:
create-react-context "^0.2.2"
deepmerge "^2.1.1"
hoist-non-react-statics "^2.5.5"
lodash "^4.17.11"
lodash-es "^4.17.11"
prop-types "^15.6.1"
react-fast-compare "^2.0.1"
tiny-warning "^1.0.2"
tslib "^1.9.3"
forwarded@~0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84"
......@@ -13662,6 +13682,16 @@ react-lifecycles-compat@^3.0.0, react-lifecycles-compat@^3.0.4:
resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362"
integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==
 
react-modal@^3.8.1:
version "3.8.1"
resolved "https://registry.yarnpkg.com/react-modal/-/react-modal-3.8.1.tgz#7300f94a6f92a2e17994de0be6ccb61734464c9e"
integrity sha512-aLKeZM9pgXpIKVwopRHMuvqKWiBajkqisDA8UzocdCF6S4fyKVfLWmZR5G1Q0ODBxxxxf2XIwiCP8G/11GJAuw==
dependencies:
exenv "^1.2.0"
prop-types "^15.5.10"
react-lifecycles-compat "^3.0.0"
warning "^3.0.0"
react-overlays@^0.7.4:
version "0.7.4"
resolved "https://registry.yarnpkg.com/react-overlays/-/react-overlays-0.7.4.tgz#ef2ec652c3444ab8aa014262b18f662068e56d5c"
......
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