diff --git a/src/pages/MainPage.tsx b/src/pages/MainPage.tsx index c0faec1..a1fe30d 100644 --- a/src/pages/MainPage.tsx +++ b/src/pages/MainPage.tsx @@ -59,7 +59,7 @@ function MainPage() { const [selectedTPO, setSelectedTPO] = useState([]); const [province, setProvince] = useState('서울특별시'); const [city, setCity] = useState('강남구'); - const [district, setDistrict] = useState('역삼동'); + const [district, setDistrict] = useState('청담동'); const today = new Date().toISOString().split('T')[0]; const [loading, setLoading] = useState(false); @@ -182,86 +182,69 @@ function MainPage() {

오늘, 나의 TPO

- - { - setCity(e.target.value); - setDistrict(Object.keys(area[province][e.target.value])[0]); + onChange={(value) => { + if (!value) return; + setCity(value); + setDistrict(Object.keys(area[province][value])[0]); }} - > - {area[province] && - Object.keys(area[province]).map((city) => ( - - ))} - - setDistrict(e.target.value)} - > - {area[province] && - area[province][city] && - Object.keys(area[province][city]).map((district) => ( - - ))} - + onChange={(value) => value && setDistrict(value)} + data={Object.keys(area[province][city])} + />
-
- {[ - '꾸안꾸', - '여름코디', - '데일리', - '데이트', - '캠퍼스룩', - '여행', - '출근룩', - '하객룩', - '휴양지', - '놀이공원', - '카페', - '운동', - '축제', - '파티', - '소개팅', - ].map((option) => ( - - ))} + + {[ + '꾸안꾸', + '여름코디', + '데일리', + '데이트', + '캠퍼스룩', + '여행', + '출근룩', + '하객룩', + '휴양지', + '놀이공원', + '카페', + '운동', + '축제', + '파티', + '소개팅', + ].map((option) => ( + + ))} +
{/* Submit Button */} - +