|
1 | 1 | import React, { useState } from 'react'; |
2 | | -import { CancelContainer, SubTitle, Text, InfoBox, InfoItem, CheckboxWrapper, CheckboxInput } from './styles'; |
3 | | -import { StyledText } from '../../components/Text/StyledText'; |
4 | | -import theme from '../../styles/theme'; |
5 | | -import { OODDFrame } from '../../components/Frame/Frame'; |
| 2 | +import { |
| 3 | + CancelContainer, |
| 4 | + SubTitle, |
| 5 | + Text, |
| 6 | + InfoBox, |
| 7 | + InfoItem, |
| 8 | + CheckboxWrapper, |
| 9 | + CheckboxInput, |
| 10 | + Label, |
| 11 | + StyledCheckboxText, |
| 12 | + StyledDiv, |
| 13 | +} from './styles'; // 상대 경로 index 명시 |
| 14 | +import { StyledText } from '@components/Text/StyledText'; |
| 15 | +import theme from '@styles/theme'; |
| 16 | +import { OODDFrame } from '@components/Frame/Frame'; |
6 | 17 | import { useNavigate } from 'react-router-dom'; |
7 | 18 |
|
8 | | -import TopBar from '../../components/TopBar'; |
9 | | -import back from '../../assets/arrow/left.svg'; |
| 19 | +import TopBar from '@components/TopBar/index'; |
| 20 | +import back from '@assets/arrow/left.svg'; |
10 | 21 |
|
11 | | -import BottomButton from '../../components/BottomButton'; |
12 | | -import { patchUserWithdrawApi } from '../../apis/user'; |
13 | | -import Modal from '../../components/Modal'; |
| 22 | +import BottomButton from '@components/BottomButton/index'; |
| 23 | +import { patchUserWithdrawApi } from '@apis/user'; |
| 24 | +import Modal from '@components/Modal/index'; |
14 | 25 |
|
15 | 26 | const AccountCancel: React.FC = () => { |
16 | 27 | const [isChecked, setIsChecked] = useState(false); |
@@ -74,45 +85,39 @@ const AccountCancel: React.FC = () => { |
74 | 85 | <TopBar text="회원 탈퇴" LeftButtonSrc={back} onClickLeftButton={() => navigate(-1)} /> |
75 | 86 |
|
76 | 87 | <SubTitle> |
77 | | - <StyledText as="div" $textTheme={{ style: 'headline2-medium', lineHeight: 2 }} color={theme.colors.black}> |
| 88 | + <StyledText as="div" $textTheme={{ style: 'headline2-medium' }} color={theme.colors.primary}> |
78 | 89 | OOTD 탈퇴 전 확인하세요! |
79 | 90 | </StyledText> |
80 | 91 | </SubTitle> |
81 | 92 | <Text as="div"> |
82 | | - <StyledText as="div" $textTheme={{ style: 'caption1-regular', lineHeight: 1 }} color={theme.colors.black}> |
| 93 | + <StyledText as="div" $textTheme={{ style: 'caption1-regular' }} color={theme.colors.primary}> |
83 | 94 | {`탈퇴하시면 이용 중인 서비스가 폐쇄되며,\n모든 데이터는 복구할 수 없습니다.`} |
84 | 95 | </StyledText> |
85 | 96 | </Text> |
86 | 97 | <InfoBox> |
87 | 98 | <InfoItem as="div"> |
88 | 99 | <StyledText |
89 | 100 | as="div" |
90 | | - $textTheme={{ style: 'body1-medium', lineHeight: 2 }} |
91 | | - color={theme.colors.black} |
92 | | - style={{ whiteSpace: 'nowrap' }} // 줄 바꿈 방지 |
| 101 | + $textTheme={{ style: 'body1-medium'}} |
| 102 | + color={theme.colors.primary} |
| 103 | + style={{ whiteSpace: 'nowrap' }} |
93 | 104 | > |
94 | 105 | 지금까지 OODD를 이용해주셔서 감사합니다! |
95 | 106 | </StyledText> |
96 | 107 | </InfoItem> |
97 | 108 | </InfoBox> |
98 | 109 | <CheckboxWrapper as="div"> |
99 | | - <label style={{ display: 'flex', alignItems: 'center', cursor: 'pointer' }}> |
| 110 | + <Label> |
100 | 111 | <CheckboxInput type="checkbox" checked={isChecked} onChange={handleCheckboxChange} /> |
101 | | - <StyledText as="span" $textTheme={{ style: 'body4-light', lineHeight: 1 }} color={theme.colors.gray3}> |
| 112 | + <StyledCheckboxText as="span" $textTheme={{ style: 'body2-regular' }}> |
102 | 113 | 안내사항을 모두 확인하였으며, 이에 동의합니다. |
103 | | - </StyledText> |
104 | | - </label> |
| 114 | + </StyledCheckboxText> |
| 115 | + </Label> |
105 | 116 | </CheckboxWrapper> |
106 | 117 | </CancelContainer> |
107 | | - <div |
108 | | - style={{ |
109 | | - backgroundColor: isChecked ? '#000000' : '#d3d3d3', |
110 | | - color: isChecked ? '#ffffff' : '#808080', |
111 | | - cursor: isChecked ? 'pointer' : 'not-allowed', |
112 | | - }} |
113 | | - > |
| 118 | + <StyledDiv isChecked={isChecked}> |
114 | 119 | <BottomButton content="탈퇴하기" onClick={handleDeleteAccount} disabled={!isChecked} /> |
115 | | - </div> |
| 120 | + </StyledDiv> |
116 | 121 | {isModalVisible && ( |
117 | 122 | <Modal |
118 | 123 | content={modalContent || ''} // null일 경우 빈 문자열로 처리 |
|
0 commit comments