#372: fix redirect to /login page

This commit is contained in:
SleepWalker 2017-12-12 23:32:05 +02:00
parent 8e998e456c
commit 46217d8cd1

View File

@ -12,10 +12,7 @@ const PrivateRoute = ({user, component: Component, ...rest}: {
}) => (
<Route {...rest} render={(props: {location: string}) => (
user.isGuest ? (
<Redirect to={{
pathname: '/login',
state: { from: props.location }
}}/>
<Redirect to="/login" />
) : (
<Component {...props}/>
)