Skip to content
Snippets Groups Projects
Commit c13bf821 authored by Giannis Kopanas's avatar Giannis Kopanas
Browse files

add new menu to xpub

parent ddfd9b2f
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@ import React from 'react'
import styled from 'styled-components'
import { compose } from 'recompose'
import { connect } from 'react-redux'
import Authorize from 'pubsweet-client/src/helpers/Authorize'
import { withRouter, matchPath } from 'react-router-dom'
// import PropTypes from 'prop-types'
......@@ -36,7 +37,7 @@ const App = ({
}) => {
const { pathname } = history.location
const showLinks = pathname.match(/submit|manuscript/g)
let links
let links = []
if (showLinks) {
const params = getParams(pathname)
......@@ -62,6 +63,12 @@ const App = ({
: null
}
links.push(
<Authorize object={{}} operation="can view teams menu">
<Action to="/teams">Team Manager</Action>
</Authorize>,
)
return (
<Root disableLinks={disableLinks}>
<AppBar
......
......@@ -17,6 +17,7 @@ import SubmitPage from 'pubsweet-component-xpub-submit/src/components/SubmitPage
import ManuscriptPage from 'pubsweet-component-xpub-manuscript/src/components/ManuscriptPage'
import ReviewersPage from 'pubsweet-component-xpub-review/src/components/ReviewersPage'
import ReviewPage from 'pubsweet-component-xpub-review/src/components/ReviewPage'
import TeamPage from 'pubsweet-component-xpub-teams-manager/src/components/TeamsManagerPage'
import DecisionPage from 'pubsweet-component-xpub-review/src/components/DecisionPage'
import UsersManager from 'pubsweet-component-users-manager/src/UsersManagerContainer'
......@@ -46,6 +47,7 @@ const Routes = () => (
exact
path="/projects/:project/versions/:version/submit"
/>
<PrivateRoute component={TeamPage} exact path="/teams" />
<PrivateRoute
component={ManuscriptPage}
exact
......
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