@@ -9,6 +9,7 @@ import { CloseIcon, SearchIcon } from '@/assets/icons/system';
99import { LayoutComponent } from '@/components' ;
1010import { subwayLineHexColors , subwayLineOptions } from '@/constants' ;
1111import { useFetchSubwayLines } from '@/services/subway' ;
12+ import { useFetchUserFavoriteStations } from '@/services/user' ;
1213import { useFlow } from '@/stackflow' ;
1314import { useUserStationStore } from '@/stores/subway' ;
1415import type { Stations , SubwayLineType , UserStationList } from '@/types' ;
@@ -29,6 +30,9 @@ const LABEL_OPTIONS = [
2930const SettingPage : ActivityComponentType = ( ) => {
3031 const { pop } = useFlow ( ) ;
3132 const { data : DEFAULT_STATIONS } = useFetchSubwayLines ( ) ;
33+ const { data : FAVORIT_STATIONS } = useFetchUserFavoriteStations ( ) ;
34+ console . log ( 'FAVORIT_STATIONS:' , FAVORIT_STATIONS ) ;
35+
3236 const [ searchTerm , setSearchTerm ] = useState ( '' ) ;
3337 const [ selectedStation , setSelectedStation ] = useState < string | null > ( null ) ;
3438 const [ labeledStations , setLabeledStations ] = useState < StationLabel [ ] > ( [ ] ) ;
@@ -203,6 +207,7 @@ const SettingPage: ActivityComponentType = () => {
203207 alert ( '역을 하나 이상 선택해주세요.' ) ;
204208 return ;
205209 }
210+
206211 const formattedStations = labeledStations . map ( station => ( {
207212 name : station . stationName ,
208213 label : LABEL_OPTIONS . find ( l => l . id === station . label ) ?. text || '' ,
0 commit comments