1- import { useState } from 'react' ;
1+ import { useState , useEffect } from 'react' ;
22import { useNavigate } from 'react-router-dom' ;
33
44import theme from '@styles/theme' ;
@@ -11,6 +11,7 @@ import back from '@assets/arrow/left.svg';
1111import BottomButton from '@components/BottomButton/index' ;
1212import { OODDFrame } from '@components/Frame/Frame' ;
1313import Modal from '@components/Modal/index' ;
14+ import Skeleton from '@components/Skeleton' ;
1415import { StyledText } from '@components/Text/StyledText' ;
1516import TopBar from '@components/TopBar/index' ;
1617
@@ -30,8 +31,15 @@ const AccountCancel: React.FC = () => {
3031 const [ isChecked , setIsChecked ] = useState ( false ) ;
3132 const [ modalContent , setModalContent ] = useState < string | null > ( null ) ;
3233 const [ isModalVisible , setIsModalVisible ] = useState < boolean > ( false ) ;
34+ const [ isLoading , setIsLoading ] = useState ( true ) ; // Loading state
3335 const navigate = useNavigate ( ) ;
3436
37+ useEffect ( ( ) => {
38+ setTimeout ( ( ) => {
39+ setIsLoading ( false ) ;
40+ } , 5000 ) ;
41+ } , [ ] ) ;
42+
3543 const handleCheckboxChange = ( ) => {
3644 setIsChecked ( ! isChecked ) ;
3745 } ;
@@ -79,6 +87,23 @@ const AccountCancel: React.FC = () => {
7987 }
8088 } ;
8189
90+ if ( isLoading ) {
91+ return (
92+ < OODDFrame >
93+ < CancelContainer >
94+ < TopBar text = "회원 탈퇴" LeftButtonSrc = { back } onClickLeftButton = { ( ) => navigate ( - 1 ) } />
95+ < SubTitle >
96+ < StyledText as = "div" $textTheme = { { style : 'headline2-medium' } } color = { theme . colors . text . primary } >
97+ OOTD 탈퇴 전 확인하세요!
98+ < Skeleton width = "100%" height = { 400 } />
99+ </ StyledText >
100+ </ SubTitle >
101+ </ CancelContainer >
102+ < BottomButton content = "탈퇴하기" onClick = { handleDeleteAccount } disabled = { ! isChecked } />
103+ </ OODDFrame >
104+ ) ;
105+ }
106+
82107 return (
83108 < OODDFrame >
84109 < CancelContainer >
0 commit comments