From a621a65360647fe520f155454d0f629d718c6046 Mon Sep 17 00:00:00 2001 From: 03hoho03 Date: Mon, 8 Apr 2024 20:53:56 +0900 Subject: [PATCH] !!fix localstorage --- app/_common/nav/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/_common/nav/index.tsx b/app/_common/nav/index.tsx index 8aa8b5c..fe0c331 100644 --- a/app/_common/nav/index.tsx +++ b/app/_common/nav/index.tsx @@ -9,7 +9,7 @@ import { useRouter } from 'next/navigation' //TODO: 사용자 프로필 이미지 가져오기 function Nav() { const router = useRouter() - const accessToken = localStorage?.getItem('accessToken') + const accessToken = typeof window && localStorage?.getItem('accessToken') const handleLogout = () => { localStorage.removeItem('accessToken')