From 689692a66ba515c8c83f0f6ecefd58a537edf7b4 Mon Sep 17 00:00:00 2001 From: Ibrahim Diallo <20114089+thisisibrahimd@users.noreply.github.com> Date: Sun, 21 Aug 2022 23:20:32 -0400 Subject: [PATCH] fix auth redirect when signed out. --- src/contexts/PolicyContext.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/contexts/PolicyContext.tsx b/src/contexts/PolicyContext.tsx index 2a1653f..95766d7 100644 --- a/src/contexts/PolicyContext.tsx +++ b/src/contexts/PolicyContext.tsx @@ -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 }) }