From 7788907b1621c144df98b1a2b7aa5c7fc45db5fd Mon Sep 17 00:00:00 2001 From: ccwnc Date: Mon, 1 Apr 2024 16:44:19 +0900 Subject: [PATCH 1/2] =?UTF-8?q?refactor:=20=EB=A1=9C=EA=B7=B8=EC=95=84?= =?UTF-8?q?=EC=9B=83=20=ED=81=B4=EB=A6=AD=20=EC=8B=9C=20=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=20=EC=83=88=EB=A1=9C=EA=B3=A0=EC=B9=A8=20=EB=A1=9C?= =?UTF-8?q?=EC=A7=81=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/layout/header/UserMenu/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/layout/header/UserMenu/index.tsx b/src/components/layout/header/UserMenu/index.tsx index a44f95ba..b56cc1df 100644 --- a/src/components/layout/header/UserMenu/index.tsx +++ b/src/components/layout/header/UserMenu/index.tsx @@ -28,6 +28,7 @@ const UserMenu = ({ profileImageUrl, nickname, email, userMenuRef, onClick }: Us const handleClickSignout = (event: React.MouseEvent) => { onClick(event); signout(); + window.location.reload(); }; return ( From d87ec1131d9aa240046d87ad4a6fbeacb8886797 Mon Sep 17 00:00:00 2001 From: ccwnc Date: Mon, 1 Apr 2024 16:56:04 +0900 Subject: [PATCH 2/2] =?UTF-8?q?refactor:=20=ED=8E=98=EC=9D=B4=EC=A7=80=20?= =?UTF-8?q?=EC=83=88=EB=A1=9C=EA=B3=A0=EC=B9=A8=20=EB=A1=9C=EC=A7=81=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/layout/header/UserMenu/index.tsx | 4 ++-- src/utils/router.ts | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/layout/header/UserMenu/index.tsx b/src/components/layout/header/UserMenu/index.tsx index b56cc1df..84672241 100644 --- a/src/components/layout/header/UserMenu/index.tsx +++ b/src/components/layout/header/UserMenu/index.tsx @@ -6,7 +6,7 @@ import { MouseEventHandler, RefObject } from 'react'; import classNames from 'classnames/bind'; import { PAGE_PATHS, SVGS } from '@/constants'; -import { signout } from '@/utils'; +import { reloadPage, signout } from '@/utils'; import Avatar from '@/components/commons/Avatar'; @@ -28,7 +28,7 @@ const UserMenu = ({ profileImageUrl, nickname, email, userMenuRef, onClick }: Us const handleClickSignout = (event: React.MouseEvent) => { onClick(event); signout(); - window.location.reload(); + reloadPage(); }; return ( diff --git a/src/utils/router.ts b/src/utils/router.ts index eb3cac8c..baaf4db7 100644 --- a/src/utils/router.ts +++ b/src/utils/router.ts @@ -15,3 +15,7 @@ export const redirectToPage = (path: string) => { export const navigateBack = () => { Router.back(); }; + +export const reloadPage = () => { + Router.reload(); +};