From e9eee26fa5c1ae32995b5af9bd6bf16e8c44514d Mon Sep 17 00:00:00 2001 From: YearaChoi <22200750@handong.ac.kr> Date: Sun, 4 Aug 2024 02:39:07 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EB=A1=9C=EA=B7=B8=EC=95=84=EC=9B=83=20?= =?UTF-8?q?=EB=B2=84=ED=8A=BC=20=ED=81=B4=EB=A6=AD=EC=8B=9C=20=EB=A1=9C?= =?UTF-8?q?=EC=BB=AC=EC=8A=A4=ED=86=A0=EB=A6=AC=EC=A7=80=EC=97=90=EC=84=9C?= =?UTF-8?q?=20jwt=20=ED=86=A0=ED=81=B0=20=EC=82=AD=EC=A0=9C=20=EB=B0=8F=20?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=20=EB=A6=AC=EB=A1=9C=EB=93=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Common/HeaderLightVer.jsx | 6 +++++- src/components/MainPage/HeaderMain.jsx | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/components/Common/HeaderLightVer.jsx b/src/components/Common/HeaderLightVer.jsx index eeb06f4..75e2a94 100644 --- a/src/components/Common/HeaderLightVer.jsx +++ b/src/components/Common/HeaderLightVer.jsx @@ -30,7 +30,11 @@ function HeaderLightVer() { navigate("/sign"); }; - const handleSignOutBtnClick = () => {}; + const handleSignOutBtnClick = () => { + localStorage.removeItem("jwtToken"); + window.location.reload(); + navigate("/"); + }; return ( diff --git a/src/components/MainPage/HeaderMain.jsx b/src/components/MainPage/HeaderMain.jsx index 69eb380..c0c15e7 100644 --- a/src/components/MainPage/HeaderMain.jsx +++ b/src/components/MainPage/HeaderMain.jsx @@ -18,7 +18,10 @@ function HeaderMain() { navigate("/sign"); }; - const handleSignOutBtnClick = () => {}; + const handleSignOutBtnClick = () => { + localStorage.removeItem("jwtToken"); + window.location.reload(); + }; useEffect(() => { document.body.style.overflow = isLoginModalOpen ? "hidden" : "auto";