@@ -16,15 +16,11 @@ import SITE_MAP from '@/constants/siteMap.constant'
1616import PreferExerciseItem from './_components/preferExerciseItem'
1717import styles from './mypage.module.css'
1818
19- import { useRemoteConfig } from '@/hooks/useRemoteConfig' //12월 17일 제거
20-
2119export default function Mypage ( ) {
2220 const todayString = format ( new Date ( ) , 'yyyy-MM-dd' )
23- const { data : profileData , isLoading : profileLoading } =
24- useReadUserFullProfile ( )
25- const { config, isLoading : remoteConfigIsLoading } = useRemoteConfig ( ) //12월17일 제거
21+ const { data : profileData , isLoading : profileLoading } = useReadUserFullProfile ( )
2622
27- if ( profileLoading || ! profileData || remoteConfigIsLoading ) return null //12월17일 remoteConfigIsLoading 제거
23+ if ( profileLoading || ! profileData ) return
2824
2925 return (
3026 < >
@@ -41,77 +37,42 @@ export default function Mypage() {
4137 { /* 프로필 영역 */ }
4238 < section className = { styles [ 'profile-section' ] } >
4339 { profileData . profileImageUrl === null ? (
44- < ProfileImg
45- profileThumbnailUrl = { profileData . profileThumbnailUrl }
46- profileImageUrl = { profileData . profileImageUrl }
47- mode = "view"
48- />
40+ < ProfileImg profileThumbnailUrl = { profileData . profileThumbnailUrl } profileImageUrl = { profileData . profileImageUrl } mode = "view" />
4941 ) : (
5042 < Link href = { SITE_MAP . MYPAGE_PICTURES } >
51- < ProfileImg
52- profileThumbnailUrl = { profileData . profileThumbnailUrl }
53- profileImageUrl = { profileData . profileImageUrl }
54- mode = "view"
55- />
43+ < ProfileImg profileThumbnailUrl = { profileData . profileThumbnailUrl } profileImageUrl = { profileData . profileImageUrl } mode = "view" />
5644 </ Link >
5745 ) }
5846
59- < Typography
60- className = { styles [ 'nickname' ] }
61- as = "span"
62- variant = "title-medium"
63- weight = "bold"
64- >
47+ < Typography className = { styles [ 'nickname' ] } as = "span" variant = "title-medium" weight = "bold" >
6548 { profileData . nickname }
6649 </ Typography >
67- < Typography
68- className = { styles [ 'birth' ] }
69- as = "span"
70- variant = "content-medium"
71- >
72- { formatGenderToKR ( profileData . gender ) } |{ ' ' }
73- { formatDateToKR ( profileData . birthDate ) }
50+ < Typography className = { styles [ 'birth' ] } as = "span" variant = "content-medium" >
51+ { formatGenderToKR ( profileData . gender ) } | { formatDateToKR ( profileData . birthDate ) }
7452 </ Typography >
7553 < div className = { styles [ 'user-info' ] } >
7654 < div className = { styles [ 'info-item' ] } >
7755 < Typography as = "span" variant = "title-medium" weight = "bold" >
7856 { profileData . exerciseCountInLast30Days }
7957 </ Typography >
80- < Typography
81- as = "span"
82- variant = "content-small"
83- className = { styles [ 'info-label' ] }
84- >
58+ < Typography as = "span" variant = "content-small" className = { styles [ 'info-label' ] } >
8559 최근 30일 운동 횟수
8660 </ Typography >
8761 </ div >
8862 < div className = { styles [ 'info-item' ] } >
89- < Typography
90- as = "span"
91- variant = "title-medium"
92- weight = "bold"
93- className = { styles [ 'info-value-container' ] }
94- >
63+ < Typography as = "span" variant = "title-medium" weight = "bold" className = { styles [ 'info-value-container' ] } >
9564 { profileData . yearlyExerciseDays }
9665 < span className = { styles [ 'info-value-suffix' ] } > / 365</ span >
9766 </ Typography >
98- < Typography
99- as = "span"
100- variant = "content-small"
101- className = { styles [ 'info-label' ] }
102- >
67+ < Typography as = "span" variant = "content-small" className = { styles [ 'info-label' ] } >
10368 올해 운동 일수
10469 </ Typography >
10570 </ div >
10671 < div className = { styles [ 'info-item' ] } >
10772 < Typography as = "span" variant = "title-medium" weight = "bold" >
10873 { profileData . exerciseScore }
10974 </ Typography >
110- < Typography
111- as = "span"
112- variant = "content-small"
113- className = { styles [ 'info-label' ] }
114- >
75+ < Typography as = "span" variant = "content-small" className = { styles [ 'info-label' ] } >
11576 운동 점수
11677 </ Typography >
11778 </ div >
@@ -124,40 +85,29 @@ export default function Mypage() {
12485 </ section >
12586
12687 { /* 선호운동 영역 */ }
127- { /* 12월 17일 플래그 제거 */ }
128- { config . new_feautre_flag && (
129- < section className = { styles [ 'prefer-exercise-section' ] } >
130- < div className = { styles [ 'prefer-exercise-title' ] } >
88+ < section className = { styles [ 'prefer-exercise-section' ] } >
89+ < div className = { styles [ 'prefer-exercise-title' ] } >
90+ < Typography as = "p" variant = "content-large" weight = "bold" >
91+ 선호 운동
92+ </ Typography >
93+ < Link href = { `${ SITE_MAP . MYPAGE_PREFER_SELECT } ?nickName=${ profileData . nickname } ` } >
94+ < EditIcon className = { styles [ 'prefer-exercise-edit-icon' ] } />
95+ </ Link >
96+ </ div >
97+ { profileData . preferredExercises . length > 0 ? (
98+ < div className = { styles [ 'prefer-exercise-list' ] } >
99+ { profileData . preferredExercises . map ( ( data ) => (
100+ < PreferExerciseItem key = { `prefer-${ data . preferredExerciseId } ` } data = { data } />
101+ ) ) }
102+ </ div >
103+ ) : (
104+ < Link href = { `${ SITE_MAP . MYPAGE_PREFER_SELECT } ?nickName=${ profileData . nickname } ` } className = { styles [ 'prefer-exercise-create' ] } >
131105 < Typography as = "p" variant = "content-large" weight = "bold" >
132- 선호 운동
106+ 선호운동을 선택해주세요 +
133107 </ Typography >
134- < Link
135- href = { `${ SITE_MAP . MYPAGE_PREFER_SELECT } ?nickName=${ profileData . nickname } ` }
136- >
137- < EditIcon className = { styles [ 'prefer-exercise-edit-icon' ] } />
138- </ Link >
139- </ div >
140- { profileData . preferredExercises . length > 0 ? (
141- < div className = { styles [ 'prefer-exercise-list' ] } >
142- { profileData . preferredExercises . map ( ( data ) => (
143- < PreferExerciseItem
144- key = { `prefer-${ data . preferredExerciseId } ` }
145- data = { data }
146- />
147- ) ) }
148- </ div >
149- ) : (
150- < Link
151- href = { `${ SITE_MAP . MYPAGE_PREFER_SELECT } ?nickName=${ profileData . nickname } ` }
152- className = { styles [ 'prefer-exercise-create' ] }
153- >
154- < Typography as = "p" variant = "content-large" weight = "bold" >
155- 선호운동을 선택해주세요 +
156- </ Typography >
157- </ Link >
158- ) }
159- </ section >
160- ) }
108+ </ Link >
109+ ) }
110+ </ section >
161111
162112 { /* 달력 영역 */ }
163113 < section className = { styles [ 'calender-section' ] } >
0 commit comments