Add s s 8854yh49944j333404040
This commit is contained in:
parent
b821173b17
commit
372c01128d
@ -10,6 +10,11 @@ import { ReactNode } from 'react'
|
|||||||
import FullScreenLoader from "@/components/common/fullScreenLoader";
|
import FullScreenLoader from "@/components/common/fullScreenLoader";
|
||||||
import { load } from '@/redux/features/settings-slice'
|
import { load } from '@/redux/features/settings-slice'
|
||||||
|
|
||||||
|
|
||||||
|
import Cookies from 'universal-cookie';
|
||||||
|
|
||||||
|
const cookies = new Cookies();
|
||||||
|
|
||||||
// HOC for auth pages ( only accept auth user )
|
// HOC for auth pages ( only accept auth user )
|
||||||
export default function LocaleLayout({children} : { children : ReactNode }) {
|
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
|
// if wasnt logged in this will fire
|
||||||
function NotLoggedInCallback()
|
function NotLoggedInCallback()
|
||||||
{
|
{
|
||||||
|
console.log('SERVER ::: not logged in')
|
||||||
|
cookies.remove('authToken', { path: '/' });
|
||||||
|
// reset the state to there initial value
|
||||||
return router.push(notAuthRedirectPage)
|
return router.push(notAuthRedirectPage)
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user