From d11b6e7a0895dc1621021eeb8a19f1379bb6c321 Mon Sep 17 00:00:00 2001 From: YOOJS1205 Date: Sun, 28 Jan 2024 23:50:10 +0900 Subject: [PATCH] =?UTF-8?q?=EC=84=A4=EC=A0=95=20=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=20=EC=9E=91=EC=84=B1,=20=EB=A1=9C=EA=B7=B8=EC=95=84?= =?UTF-8?q?=EC=9B=83=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/icon16/arrow_square_16.svg | 4 ++++ src/app/settings/layout.tsx | 4 +++- src/app/settings/page.tsx | 15 +++++++++++++-- src/hooks/api/useLogout.ts | 19 +++++++++++++++++++ 4 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 public/assets/icon16/arrow_square_16.svg create mode 100644 src/hooks/api/useLogout.ts diff --git a/public/assets/icon16/arrow_square_16.svg b/public/assets/icon16/arrow_square_16.svg new file mode 100644 index 00000000..e5f1521d --- /dev/null +++ b/public/assets/icon16/arrow_square_16.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/app/settings/layout.tsx b/src/app/settings/layout.tsx index 7811a1e0..a7797995 100644 --- a/src/app/settings/layout.tsx +++ b/src/app/settings/layout.tsx @@ -7,7 +7,9 @@ interface TermsLayoutProps { export default function layout({ children }: TermsLayoutProps) { return (
-
+
+

설정

+
{children}
); diff --git a/src/app/settings/page.tsx b/src/app/settings/page.tsx index 30968d37..86c9d30d 100644 --- a/src/app/settings/page.tsx +++ b/src/app/settings/page.tsx @@ -4,24 +4,35 @@ import { useRouter } from 'next/navigation'; import { SETTINGS, Setting } from '@constants/settings'; import RightArrowIcon from 'public/assets/icon24/right_arrow_24.svg'; +import ArrowSquareIcon from 'public/assets/icon16/arrow_square_16.svg'; +import { useLogout } from '@hooks/api/useLogout'; export default function Page() { const { push } = useRouter(); + const { mutate: logout } = useLogout(); const handleClickSettingItem = (setting: Setting) => () => { if (setting.url) { push(setting.url); } + + if (setting.title === '로그아웃') { + logout(); + } }; + return (