Add s s 8854yh49944j333404040

This commit is contained in:
yznahmad 2025-06-23 01:27:42 +03:00
parent b821173b17
commit 372c01128d

View File

@ -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 (