commit
39fc7f09b4
2 changed files with 4 additions and 4 deletions
|
|
@ -7,8 +7,8 @@ const Authenticated = ({ loggingIn, authenticated, component, ...rest }) => (
|
|||
{...rest}
|
||||
render={props => (
|
||||
authenticated ?
|
||||
(React.createElement(component, { ...props, loggingIn, authenticated })) :
|
||||
(<Redirect to="/logout" />)
|
||||
(React.createElement(component, { ...props, ...rest, loggingIn, authenticated })) :
|
||||
(<Redirect to="/logout" />)
|
||||
)}
|
||||
/>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ const Public = ({ loggingIn, authenticated, component, ...rest }) => (
|
|||
{...rest}
|
||||
render={props => (
|
||||
!authenticated ?
|
||||
(React.createElement(component, { ...props, loggingIn, authenticated })) :
|
||||
(<Redirect to="/documents" />)
|
||||
(React.createElement(component, { ...props, ...rest, loggingIn, authenticated })) :
|
||||
(<Redirect to="/documents" />)
|
||||
)}
|
||||
/>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue