Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
X
xpub-epmc
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Literature-services
public-projects
xpub-epmc
Merge requests
!66
Shared data model
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Shared data model
shared-data-model
into
dev
Overview
0
Commits
32
Pipelines
0
Changes
32
Merged
lit_git
requested to merge
shared-data-model
into
dev
6 years ago
Overview
0
Commits
32
Pipelines
0
Changes
32
Expand
0
0
Merge request reports
Compare
dev
dev (base)
and
latest version
latest version
a13b7114
32 commits,
6 years ago
32 files
+
600
−
223
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
32
Search (e.g. *.vue) (Ctrl+P)
app/components/activity/ActivityPage.jsx
+
14
−
3
Options
import
React
from
'
react
'
import
{
withRouter
}
from
'
react-router
'
import
{
Query
}
from
'
react-apollo
'
import
{
H1
}
from
'
@pubsweet/ui
'
import
{
Page
,
Loading
,
LoadingIcon
}
from
'
../ui
'
@@ -17,7 +18,7 @@ const ActivityPage = props => (
const
ActivityPageWithHeader
=
SubmissionHeader
(
ActivityPage
)
const
ActivityPageContainer
=
({
match
,
...
props
})
=>
(
const
ActivityPageContainer
=
({
currentUser
,
history
,
match
,
...
props
})
=>
(
<
Query
query
=
{
QUERY_ACTIVITY_INFO
}
variables
=
{
{
id
:
match
.
params
.
id
}
}
>
{
({
data
,
loading
})
=>
{
if
(
loading
||
!
data
||
!
data
.
activities
)
{
@@ -27,9 +28,19 @@ const ActivityPageContainer = ({ match, ...props }) => (
</
Loading
>
)
}
return
<
ActivityPageWithHeader
manuscript
=
{
data
.
activities
}
{
...
props
}
/>
if
(
currentUser
.
admin
)
{
return
(
<
ActivityPageWithHeader
currentUser
=
{
currentUser
}
manuscript
=
{
data
.
activities
}
{
...
props
}
/>
)
}
history
.
push
(
'
/
'
)
return
null
}
}
</
Query
>
)
export
default
ActivityPageContainer
export
default
withRouter
(
ActivityPageContainer
)