diff --git a/public/assets/label_activity.svg b/public/assets/label_activity.svg index edad1ee..59e9154 100644 --- a/public/assets/label_activity.svg +++ b/public/assets/label_activity.svg @@ -1,5 +1,36 @@ - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/components/Common/CardFindMaker.tsx b/src/components/Common/CardFindMaker.tsx index 36124f2..e616da3 100644 --- a/src/components/Common/CardFindMaker.tsx +++ b/src/components/Common/CardFindMaker.tsx @@ -37,6 +37,19 @@ interface CardFindMakerProps { isFollowed?: boolean; serviceTypes: ServiceType[]; } + +const serviceTypeOrder: ServiceType[] = [ + "SHOPPING", + "FOOD_TOUR", + "ACTIVITY", + "CULTURE", + "FESTIVAL", + "RELAXATION", + "REQUEST", + "PENDING", + "CONFIRMED", +]; + const CardFindMaker = ({ labelSize, cardSize, @@ -86,6 +99,11 @@ const CardFindMaker = ({ }; }, []); + + const sortedServiceTypes = [...serviceTypes].sort( + (a, b) => serviceTypeOrder.indexOf(a) - serviceTypeOrder.indexOf(b) + ); + return (
- - {(serviceTypes || []).slice(0, cardWidth < 467 ? 2 : (cardWidth< 650 ? 3 : (cardWidth < 756 ? 4 : (cardWidth < 840 ? 5 : serviceTypes.length)))).map((type, index) => ( -

diff --git a/src/components/Common/DreamerFilter.tsx b/src/components/Common/DreamerFilter.tsx index d4d13cb..ce39627 100644 --- a/src/components/Common/DreamerFilter.tsx +++ b/src/components/Common/DreamerFilter.tsx @@ -3,18 +3,10 @@ import Image from "next/image"; import downBlue from "@public/assets/dropdown_down_blue.svg"; import downGray from "@public/assets/dropdown_down_gray.svg"; -const placeholder = "지역"; -const items = ["전체", "서울", "경기", "인천", "강원", "충북", "충남", "세종", "대전", "전북"]; -const placeholder2 = "서비스"; -const items2 = [ - "전체", - "기념품/쇼핑형", - "맛집 탐방형", - "액티비티/탐험형", - "문화/역사탐방형", - "축제참여형", - "휴양형", -]; +const placeholder = '지역'; +const items = ['전체', '서울', '부산', '인천', '대구', '대전', '광주', '울산', '세종', '경기', '강원', '충북', '충남', '전북', '전남', '경북', '경남', '제주']; +const placeholder2 = '서비스'; +const items2 = ['전체', '기념품/쇼핑형', '맛집 탐방형', '액티비티/탐험형', '문화/역사탐방형', '축제참여형', '휴양형']; const serviceTypeMapping: Record = { 전체: "", @@ -27,16 +19,24 @@ const serviceTypeMapping: Record = { }; const areaMapping: Record = { - 전체: "", - 서울: "SEOUL", - 경기: "GYEONGGI", - 인천: "INCHEON", - 강원: "GANGWON", - 충북: "CHUNGBUK", - 충남: "CHUNGNAM", - 세종: "SEJONG", - 대전: "DAEJEON", - 전북: "JEONBUK", + '전체': '', + '서울': 'SEOUL', + '부산': 'BUSAN', + '인천': 'INCHEON', + '대구': 'DAEGU', + '대전': 'DAEJEON', + '광주': 'GWANGJU', + '울산': 'ULSAN', + '세종': 'SEJONG', + '경기': 'GYEONGGI', + '강원': 'GANGWON', + '충북': 'CHUNGBUK', + '충남': 'CHUNGNAM', + '전북': 'JEONBUK', + '전남': 'JEONNAM', + '경북': 'GYEONGBUK', + '경남': 'GYEONGNAM', + '제주': 'JEJU', }; interface DreamerFilterProps { diff --git a/src/components/Common/DropdownSort.tsx b/src/components/Common/DropdownSort.tsx index 106fc19..5b402ce 100644 --- a/src/components/Common/DropdownSort.tsx +++ b/src/components/Common/DropdownSort.tsx @@ -60,7 +60,7 @@ const DropdownSort = ({ onSort }: DropdownSortProps) => { /> {isOpen && ( -
diff --git a/src/pages/finding-maker/index.tsx b/src/pages/finding-maker/index.tsx index 61ef150..8c60da5 100644 --- a/src/pages/finding-maker/index.tsx +++ b/src/pages/finding-maker/index.tsx @@ -112,9 +112,19 @@ export default function FindingMaker() { } }; - if (isLoggedIn) { - fetchFollowedItems(); - } + const handleResize = () => { + const isComponentVisible = window.innerWidth > 746; + if (isLoggedIn && isComponentVisible) { + fetchFollowedItems(); + } + }; + + window.addEventListener('resize', handleResize); + handleResize(); + + return () => { + window.removeEventListener('resize', handleResize); + }; }, [isLoggedIn]); return ( @@ -126,6 +136,14 @@ export default function FindingMaker() { padding: 0 72px; } } + @media (max-width: 374px) { + .main-container { + padding: 0 5px; + } + .hide-on-374 { + display: none; + } + } .flash { animation: flash-animation 0.3s ease-in-out; } @@ -194,17 +212,17 @@ export default function FindingMaker() {
-
+
-
+