From 167e7007afaa73f984d0f11f0c1298ddaf92b580 Mon Sep 17 00:00:00 2001 From: Alireza Date: Tue, 28 Nov 2023 00:35:30 +0330 Subject: [PATCH] feat: hmm --- frontend/src/components/main-content/MainContent.jsx | 2 -- frontend/src/providers/APIProvider/APIProvider.jsx | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/main-content/MainContent.jsx b/frontend/src/components/main-content/MainContent.jsx index 0c252a1..8035ea7 100644 --- a/frontend/src/components/main-content/MainContent.jsx +++ b/frontend/src/components/main-content/MainContent.jsx @@ -3,7 +3,6 @@ import PageFooter from '../footer/PageFooter'; import ForgotPassword from '../../pages/ForgotPassword/ForgotPassword.jsx'; import { useConfig } from '../../providers/config-provider/ConfigProvider.jsx'; import DrawerAppBar from '../app-bar/AppBar.jsx'; -import PaymentCallbackPage from '../../pages/payment-callback/PaymentCallbackPage'; export default function MainContent() { const { ROUTES } = useConfig(); @@ -20,7 +19,6 @@ export default function MainContent() { return ; })} } key="forgot" /> - } /> {pathname !== '/' && ( diff --git a/frontend/src/providers/APIProvider/APIProvider.jsx b/frontend/src/providers/APIProvider/APIProvider.jsx index 2c19792..4aa7472 100644 --- a/frontend/src/providers/APIProvider/APIProvider.jsx +++ b/frontend/src/providers/APIProvider/APIProvider.jsx @@ -55,9 +55,10 @@ export function APIProvider({children}) { if (error == null) return + console.log(error) if (error.response.status === 401) { localStorage.removeItem('user') - setAccessTokenFromLocalStorage() + window.location.reload(); } }) }, [refreshToken, service, setAccessTokenFromLocalStorage])