diff --git a/src/app/dashboard/dashLayout.tsx b/src/app/dashboard/dashLayout.tsx index 5cabe21..ed12bf1 100644 --- a/src/app/dashboard/dashLayout.tsx +++ b/src/app/dashboard/dashLayout.tsx @@ -2,7 +2,7 @@ import Image from 'next/image' import React, { useState } from 'react' // import { useRouter } from ''; -import { redirect, usePathname } from 'next/navigation' +import { usePathname } from 'next/navigation' import imageDecenterLogoWhite from '@public/Logo White.png' import imageDecenterLogoSubtitle from '@public/Logo Texts.png' import { RxDashboard } from 'react-icons/rx' @@ -24,7 +24,7 @@ import { useRouter } from 'next/navigation' export const DashLayout = ({ children }: { children: React.ReactNode }) => { const { user } = useUserStore() const pathname = usePathname() - + const { push, replace } = useRouter() const [isNotificationOpen, setNotificationOpen] = useState(false) const [showBackdrop, setShowBackdrop] = useState(false) const [isProfileOpen, setProfileOpen] = useState(false) @@ -46,7 +46,7 @@ export const DashLayout = ({ children }: { children: React.ReactNode }) => { console.log('logout') localStorage.clear() userStore.clearUser() - redirect('/explore') + replace('/explore') // push('/explore') } @@ -193,7 +193,7 @@ export const DashLayout = ({ children }: { children: React.ReactNode }) => { ) : (