Skip to content

Commit

Permalink
fix auth redirect when signed out.
Browse files Browse the repository at this point in the history
  • Loading branch information
thisisibrahimd committed Aug 22, 2022
1 parent c123f4f commit 689692a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/contexts/PolicyContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function PolicyProvider({ children }) {
if (err.code === 7 || err.code === 16){
enqueueSnackbar(`You are not authorized to perform this action. Please Log in`, { variant: Severity.Error, action: SnackbarDismissButton } )
token.logout()
navigate("/login");
navigate("/auth/login");
} else {
enqueueSnackbar(`Encountered an error while fetching policy: ${err.message}. Error code: ${err.code}`, { variant: Severity.Error, action: SnackbarDismissButton })
}
Expand Down

0 comments on commit 689692a

Please sign in to comment.