From ccff5a1944c30e3e8a1794d3af2fe6b2bd977c87 Mon Sep 17 00:00:00 2001 From: suwonthugger <127329855+suwonthugger@users.noreply.github.com> Date: Sat, 21 Dec 2024 21:10:46 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20ModalContents=20=ED=8F=B4=EB=8D=94?= =?UTF-8?q?=20=EA=B5=AC=EC=A1=B0=20=EB=B3=80=EA=B2=BD=20(#230)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ButtonAlert}/ButtonAlert.tsx | 2 +- .../Setting/ModalContentsAlert/Complete.tsx | 8 ++++---- .../Setting/ModalContentsAlert/DeleteAccount.tsx | 14 +++++++------- .../Setting/ModalContentsAlert/Logout.tsx | 10 +++++----- .../ModalContentsAlert/ModalContentsAlert.tsx | 6 +++--- .../Setting/ModalContentsAlert/types/index.ts | 4 ++++ 6 files changed, 24 insertions(+), 20 deletions(-) rename src/pages/HomePage/ModalContents/Setting/{components => ModalContentsAlert/ButtonAlert}/ButtonAlert.tsx (83%) create mode 100644 src/pages/HomePage/ModalContents/Setting/ModalContentsAlert/types/index.ts diff --git a/src/pages/HomePage/ModalContents/Setting/components/ButtonAlert.tsx b/src/pages/HomePage/ModalContents/Setting/ModalContentsAlert/ButtonAlert/ButtonAlert.tsx similarity index 83% rename from src/pages/HomePage/ModalContents/Setting/components/ButtonAlert.tsx rename to src/pages/HomePage/ModalContents/Setting/ModalContentsAlert/ButtonAlert/ButtonAlert.tsx index cb52cd87..aa54e587 100644 --- a/src/pages/HomePage/ModalContents/Setting/components/ButtonAlert.tsx +++ b/src/pages/HomePage/ModalContents/Setting/ModalContentsAlert/ButtonAlert/ButtonAlert.tsx @@ -13,7 +13,7 @@ const ButtonAlert = ({ children, variant = 'primary', className = '', ...props } return ( diff --git a/src/pages/HomePage/ModalContents/Setting/ModalContentsAlert/Complete.tsx b/src/pages/HomePage/ModalContents/Setting/ModalContentsAlert/Complete.tsx index d32f5436..b27ab6eb 100644 --- a/src/pages/HomePage/ModalContents/Setting/ModalContentsAlert/Complete.tsx +++ b/src/pages/HomePage/ModalContents/Setting/ModalContentsAlert/Complete.tsx @@ -1,11 +1,11 @@ -import { AlertModalProps } from '@/pages/HomePage/components/ModalContents/Setting/ModalContentsAlert/ModalContentsAlert'; -import ButtonAlert from '@/pages/HomePage/components/ModalContents/Setting/components/ButtonAlert'; +import ButtonAlert from './ButtonAlert/ButtonAlert'; +import { AlertModalProps } from './types/index'; const Complete = ({ handleClose, userEmail }: AlertModalProps) => (
-

{userEmail} 계정이

-

삭제되었습니다.

+

{userEmail} 계정이

+

삭제되었습니다.

확인 diff --git a/src/pages/HomePage/ModalContents/Setting/ModalContentsAlert/DeleteAccount.tsx b/src/pages/HomePage/ModalContents/Setting/ModalContentsAlert/DeleteAccount.tsx index b09a38cb..a4631f6d 100644 --- a/src/pages/HomePage/ModalContents/Setting/ModalContentsAlert/DeleteAccount.tsx +++ b/src/pages/HomePage/ModalContents/Setting/ModalContentsAlert/DeleteAccount.tsx @@ -2,8 +2,8 @@ import { FormEvent, useRef, useState } from 'react'; import IconWarning from '@/shared/assets/svgs/ic_delete_alert.svg?react'; -import { AlertModalProps } from '@/pages/HomePage/components/ModalContents/Setting/ModalContentsAlert/ModalContentsAlert'; -import ButtonAlert from '@/pages/HomePage/components/ModalContents/Setting/components/ButtonAlert'; +import ButtonAlert from './ButtonAlert/ButtonAlert'; +import { AlertModalProps } from './types/index'; const DeleteAccount = ({ handleClose, userEmail }: AlertModalProps) => { const inputRef = useRef(null); @@ -27,22 +27,22 @@ const DeleteAccount = ({ handleClose, userEmail }: AlertModalProps) => {
-

{userEmail} 계정이

-

+

{userEmail} 계정이

+

영구적으로 삭제됩니다. 삭제하시겠습니까?

-

이메일을 입력하여 확인해주세요.

+

이메일을 입력하여 확인해주세요.

{error && (
-

계속하려면 “{userEmail}”을(를) 입력하세요.

+

계속하려면 “{userEmail}”을(를) 입력하세요.

)}
diff --git a/src/pages/HomePage/ModalContents/Setting/ModalContentsAlert/Logout.tsx b/src/pages/HomePage/ModalContents/Setting/ModalContentsAlert/Logout.tsx index 472d5942..6c9e99e5 100644 --- a/src/pages/HomePage/ModalContents/Setting/ModalContentsAlert/Logout.tsx +++ b/src/pages/HomePage/ModalContents/Setting/ModalContentsAlert/Logout.tsx @@ -1,13 +1,13 @@ -import { AlertModalProps } from '@/pages/HomePage/components/ModalContents/Setting/ModalContentsAlert/ModalContentsAlert'; -import ButtonAlert from '@/pages/HomePage/components/ModalContents/Setting/components/ButtonAlert'; +import ButtonAlert from './ButtonAlert/ButtonAlert'; +import { AlertModalProps } from './types/index'; const Logout = ({ handleClose, userEmail }: AlertModalProps) => (
-

{userEmail} 계정이

-

+

{userEmail} 계정이

+

본 기기를 포함한 모든 기기에서 로그아웃됩니다.

-

로그아웃 하시겠습니까?

+

로그아웃 하시겠습니까?

로그아웃 diff --git a/src/pages/HomePage/ModalContents/Setting/ModalContentsAlert/ModalContentsAlert.tsx b/src/pages/HomePage/ModalContents/Setting/ModalContentsAlert/ModalContentsAlert.tsx index 2168ef11..d19de14a 100644 --- a/src/pages/HomePage/ModalContents/Setting/ModalContentsAlert/ModalContentsAlert.tsx +++ b/src/pages/HomePage/ModalContents/Setting/ModalContentsAlert/ModalContentsAlert.tsx @@ -1,6 +1,6 @@ -import Complete from '@/pages/HomePage/components/ModalContents/Setting/ModalContentsAlert/Complete'; -import DeleteAccount from '@/pages/HomePage/components/ModalContents/Setting/ModalContentsAlert/DeleteAccount'; -import Logout from '@/pages/HomePage/components/ModalContents/Setting/ModalContentsAlert/Logout'; +import Complete from './Complete'; +import DeleteAccount from './DeleteAccount'; +import Logout from './Logout'; export interface AlertModalProps { handleClose?: () => void; diff --git a/src/pages/HomePage/ModalContents/Setting/ModalContentsAlert/types/index.ts b/src/pages/HomePage/ModalContents/Setting/ModalContentsAlert/types/index.ts new file mode 100644 index 00000000..0a0dd195 --- /dev/null +++ b/src/pages/HomePage/ModalContents/Setting/ModalContentsAlert/types/index.ts @@ -0,0 +1,4 @@ +export interface AlertModalProps { + handleClose?: () => void; + userEmail?: string; +}