@@ -8,14 +8,18 @@ import useMyPageStore from '@/stores/myPageStore';
88
99import { TEMPERATURE_RANGE } from './constants' ;
1010import useToastStore from '@/stores/toastStore' ;
11+ import ModalOverlay from '@/components/ModalOverlay' ;
1112
1213const MyPage = ( ) => {
1314 useEffect ( ( ) => {
1415 fetchMyPageInfo ( ) ;
1516 } , [ ] ) ;
1617
1718 const { data, fetchMyPageInfo } = useMyPageStore ( ) ;
19+
1820 const [ isOpenModal , setIsOpenModal ] = useState ( false ) ;
21+ const [ isOpenWarningModal , setIsOpenWarningModal ] = useState ( false ) ;
22+
1923 const logout = useAuthStore ( ( state ) => state . logout ) ;
2024 const setToastActive = useToastStore ( ( state ) => state . setToastActive ) ;
2125
@@ -60,6 +64,19 @@ const MyPage = () => {
6064 } }
6165 />
6266 ) }
67+
68+ { isOpenWarningModal && (
69+ < ModalOverlay closeOnOutsideClick onClose = { ( ) => setIsOpenWarningModal ( false ) } >
70+ < article className = "bg-accent-1 relative w-77 overflow-hidden rounded-sm p-6" >
71+ < div className = "absolute inset-0 h-full w-full bg-white/90 blur-[25px]" />
72+ < div className = "relative" >
73+ < h2 className = "body-sb mb-1.5 text-gray-100" > 경고 규칙</ h2 >
74+ < p className = "caption-r text-black" > 3회 경고: 서비스 이용 불가능</ p >
75+ </ div >
76+ </ article >
77+ </ ModalOverlay >
78+ ) }
79+
6380 < main className = "flex grow flex-col gap-12 px-5 pt-20 pb-6" >
6481 < h1 className = "h2-b mx-auto flex gap-1.5" >
6582 { data . zipCode . split ( '' ) . map ( ( code , index ) => (
@@ -109,11 +126,24 @@ const MyPage = () => {
109126 < span > { data . email } </ span >
110127 </ p >
111128 </ div >
129+ < div
130+ className = "flex justify-between"
131+ onClick = { async ( ) => {
132+ setIsOpenWarningModal ( true ) ;
133+ } }
134+ >
135+ < p className = "body-sb text-gray-100" > 경고 횟수</ p >
136+ < p className = "body-r text-gray-60" >
137+ < span > { data . warningCount } 회</ span >
138+ </ p >
139+ </ div >
140+
112141 < button
113142 className = "body-sb self-start text-gray-100"
114143 onClick = { ( ) => {
115144 logout ( ) ;
116145 } }
146+ aria-label = "로그아웃"
117147 >
118148 로그아웃
119149 </ button >
@@ -125,6 +155,7 @@ const MyPage = () => {
125155 onClick = { async ( ) => {
126156 setIsOpenModal ( true ) ;
127157 } }
158+ aria-label = "탈퇴하기"
128159 >
129160 탈퇴하기
130161 </ button >
0 commit comments