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