Skip to content
Snippets Groups Projects
Commit 8df82db8 authored by Andy Nicholson's avatar Andy Nicholson
Browse files

fix(*): remove eslint disable line

parent 992e3ee7
No related branches found
No related tags found
No related merge requests found
...@@ -8,6 +8,7 @@ import { ...@@ -8,6 +8,7 @@ import {
Switch, Switch,
Redirect, Redirect,
} from 'react-router-dom' } from 'react-router-dom'
import PropTypes from 'prop-types'
import { JournalContext } from './xpub-journal/src' import { JournalContext } from './xpub-journal/src'
import { XpubContext } from './xpub-with-context/src' import { XpubContext } from './xpub-with-context/src'
...@@ -31,6 +32,8 @@ import { Spinner } from './shared' ...@@ -31,6 +32,8 @@ import { Spinner } from './shared'
import currentRolesVar from '../shared/currentRolesVar' import currentRolesVar from '../shared/currentRolesVar'
import RolesUpdater from './RolesUpdater' import RolesUpdater from './RolesUpdater'
const getParams = routerPath => { const getParams = routerPath => {
const path = '/journal/versions/:version' const path = '/journal/versions/:version'
return matchPath(routerPath, path).params return matchPath(routerPath, path).params
...@@ -54,7 +57,6 @@ const Root = styled.div` ...@@ -54,7 +57,6 @@ const Root = styled.div`
` `
// TODO: Redirect if token expires // TODO: Redirect if token expires
// eslint-disable-next-line react/prop-types
const PrivateRoute = ({ component: Component, ...rest }) => ( const PrivateRoute = ({ component: Component, ...rest }) => (
<Route <Route
{...rest} {...rest}
...@@ -68,6 +70,10 @@ const PrivateRoute = ({ component: Component, ...rest }) => ( ...@@ -68,6 +70,10 @@ const PrivateRoute = ({ component: Component, ...rest }) => (
/> />
) )
PrivateRoute.propTypes = {
component: PropTypes.node.isRequired,
}
// eslint-disable-next-line consistent-return // eslint-disable-next-line consistent-return
const updateStuff = data => { const updateStuff = data => {
if (data?.currentUser) { if (data?.currentUser) {
......
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