From 5f196acb4a0eeab677ab0793eb61b4f635014edd Mon Sep 17 00:00:00 2001 From: wood chen Date: Fri, 21 Feb 2025 15:36:47 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E7=A7=BB=E9=99=A4=E4=B8=8D?= =?UTF-8?q?=E5=BF=85=E8=A6=81=E7=9A=84=E4=BC=9A=E8=AF=9D=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E4=BB=A5=E7=AE=80=E5=8C=96=E5=AF=BC=E8=88=AA?= =?UTF-8?q?=E6=A0=8F=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/layout/nav-bar.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/components/layout/nav-bar.tsx b/src/components/layout/nav-bar.tsx index c28f052..3229aa7 100644 --- a/src/components/layout/nav-bar.tsx +++ b/src/components/layout/nav-bar.tsx @@ -21,15 +21,11 @@ import { ThemeToggle } from "../theme-toggle"; import { Button } from "../ui/button"; export function NavBar() { - const { data: session, status, update } = useSession(); + const { data: session, status } = useSession(); const router = useRouter(); const pathname = usePathname(); const user = session?.user; - useEffect(() => { - update(); - }, [update]); - const handleSignOut = async () => { await signOut({ redirect: false }); router.refresh();