From 372c01128d23d26922365737fd18b4c1c34bca44 Mon Sep 17 00:00:00 2001 From: yznahmad Date: Mon, 23 Jun 2025 01:27:42 +0300 Subject: [PATCH] Add s s 8854yh49944j333404040 --- webapp/src/app/[locale]/(GlobalWrapper)/(Auth)/layout.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/webapp/src/app/[locale]/(GlobalWrapper)/(Auth)/layout.tsx b/webapp/src/app/[locale]/(GlobalWrapper)/(Auth)/layout.tsx index 1c342cc..d0f0230 100644 --- a/webapp/src/app/[locale]/(GlobalWrapper)/(Auth)/layout.tsx +++ b/webapp/src/app/[locale]/(GlobalWrapper)/(Auth)/layout.tsx @@ -10,6 +10,11 @@ import { ReactNode } from 'react' import FullScreenLoader from "@/components/common/fullScreenLoader"; import { load } from '@/redux/features/settings-slice' + +import Cookies from 'universal-cookie'; + +const cookies = new Cookies(); + // HOC for auth pages ( only accept auth user ) export default function LocaleLayout({children} : { children : ReactNode }) { @@ -45,6 +50,9 @@ export default function LocaleLayout({children} : { children : ReactNode }) { // if wasnt logged in this will fire function NotLoggedInCallback() { + console.log('SERVER ::: not logged in') + cookies.remove('authToken', { path: '/' }); + // reset the state to there initial value return router.push(notAuthRedirectPage) } return (