Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pubsweet-client
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
There was a problem fetching the latest pipeline status.
Show more breadcrumbs
pubsweet
pubsweet-client
Commits
4247ac2e
Commit
4247ac2e
authored
7 years ago
by
Alexandros Georgantas
Browse files
Options
Downloads
Patches
Plain Diff
Initial commit for modal functionality
parent
83b12bd9
No related branches found
No related tags found
No related merge requests found
Pipeline
#3412
failed with stage
in 1 minute and 35 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/components/Root.js
+23
-7
23 additions, 7 deletions
src/components/Root.js
with
23 additions
and
7 deletions
src/components/Root.js
+
23
−
7
View file @
4247ac2e
...
...
@@ -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
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment