Skip to content

Commit

Permalink
feat: hmm
Browse files Browse the repository at this point in the history
  • Loading branch information
AlirezaYousefpourM committed Nov 27, 2023
1 parent 8962ae8 commit 167e700
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 0 additions & 2 deletions frontend/src/components/main-content/MainContent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -20,7 +19,6 @@ export default function MainContent() {
return <Route path={ROUTES[name].path} element={ROUTES[name]?.component} key={name} />;
})}
<Route path="/forgotpassword" element={<ForgotPassword />} key="forgot" />
<Route path="/payment-callback" element={<PaymentCallbackPage />} />
</Routes>
</main>
{pathname !== '/' && (
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/providers/APIProvider/APIProvider.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit 167e700

Please sign in to comment.