mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-12-23 05:29:56 +05:30
#372: fix redirect to /login page
This commit is contained in:
parent
8e998e456c
commit
46217d8cd1
@ -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}/>
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user