Skip to content

Commit b18c082

Browse files
author
Vito Chin
committed
Redirect to /auth instead of /login if not yet authenticated
1 parent 025cee5 commit b18c082

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/_components/PrivateRoute.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ export const PrivateRoute = ({ component: Component, ...rest }) => (
55
<Route {...rest} render={props => (
66
localStorage.getItem('user')
77
? <Component {...props} />
8-
: <Redirect to={{ pathname: '/login', state: { from: props.location } }} />
8+
: <Redirect to={'/auth'} />
99
)} />
1010
)

0 commit comments

Comments
 (0)