Skip to content

Commit

Permalink
Change redirect (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
eddsaura committed Jan 25, 2022
1 parent f8be256 commit 28b3741
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/contexts/AuthContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ const ProtectRoute = ({ children }) => {
if (!loading && protectedRoutes) {
const pathname = isAuthenticated
? router.query.redirect || ROUTE_HOME
: `${ROUTE_SIGN_IN}?redirect=${router.pathname}`;
: `${ROUTE_REGISTER}?redirect=${router.pathname}`;
const route = pathname.toString();
router.push(route, route, { locale: lang });
}
Expand Down

0 comments on commit 28b3741

Please sign in to comment.