diff --git a/package.json b/package.json index 86b514f2..38e4bd3a 100644 --- a/package.json +++ b/package.json @@ -76,4 +76,4 @@ "pnpm": "use npm instead of pnpm", "bun": "use npm instead of bun" } -} \ No newline at end of file +} diff --git a/src/app/map/search/page.tsx b/src/app/map/search/page.tsx new file mode 100644 index 00000000..7de2914c --- /dev/null +++ b/src/app/map/search/page.tsx @@ -0,0 +1,111 @@ +'use client' + +import AccessibleIconButton from '@/components/common/accessible-icon-button' +import SearchInput from '@/components/common/search-input' +import Tab from '@/components/common/tab/tab' +import TabLabels from '@/components/common/tab/tab-labels' +import TabPanel from '@/components/common/tab/tab-panel' +import Typography from '@/components/common/typography' +import useSafeRouter from '@/hooks/use-safe-router' +import { useState } from 'react' +import SearchMapCard from './search-map-card' +import Link from 'next/link' +import SearchMenuList from './search-menu-list' +import SearchCityList from './search-location-list' + +const MapSearch = () => { + const [activeTab, setActiveTab] = useState<'인기 많은순' | '가까운 순'>( + '인기 많은순', + ) + const router = useSafeRouter() + + return ( + <> +
+
+ router.safeBack()} + /> + + 지도 둘러보기 + +
+ +
+
+ {}} + /> +
+ + {}} /> + {}} /> + + + + +
    + + + + + + +
+
+ + +
    + + + +
+
+
+
+
+ + ) +} + +export default MapSearch diff --git a/src/app/map/search/search-icon-chip.tsx b/src/app/map/search/search-icon-chip.tsx new file mode 100644 index 00000000..44b3e645 --- /dev/null +++ b/src/app/map/search/search-icon-chip.tsx @@ -0,0 +1,30 @@ +import type { IconKey } from '@/components/common/icon' +import Icon from '@/components/common/icon' +import Typography from '@/components/common/typography' +import cn from '@/utils/cn' + +const SearchIconChip = ({ + label, + iconType, + className, +}: { + label: string + iconType?: IconKey + className?: string +}) => { + return ( + + {iconType && } + + {label} + + + ) +} + +export default SearchIconChip diff --git a/src/app/map/search/search-location-list.tsx b/src/app/map/search/search-location-list.tsx new file mode 100644 index 00000000..9248f455 --- /dev/null +++ b/src/app/map/search/search-location-list.tsx @@ -0,0 +1,49 @@ +import Typography from '@/components/common/typography' +import type { ClassName } from '@/models/common' +import cn from '@/utils/cn' +import SearchIconChip from './search-icon-chip' + +interface SearchLocationListProps extends ClassName { + onClickLocation: (location: string) => void +} + +const locations: string[] = [ + '종로', + '강남', + '여의도', + '가산', + '성수', + '판교', + '마곡', + '구로 디지털단지', + '문정', + ' 상암', + '세종', +] + +const SearchLocationList = ({ + className, + onClickLocation, +}: SearchLocationListProps) => { + return ( +
+ + 지역 + + + +
+ ) +} + +export default SearchLocationList diff --git a/src/app/map/search/search-map-card.tsx b/src/app/map/search/search-map-card.tsx new file mode 100644 index 00000000..47d4baf9 --- /dev/null +++ b/src/app/map/search/search-map-card.tsx @@ -0,0 +1,64 @@ +import Icon from '@/components/common/icon' +import Typography from '@/components/common/typography' +import type { ClassName } from '@/models/common' +import type { MapInfo } from '@/models/map' +import cn from '@/utils/cn' +import SearchIconChip from './search-icon-chip' + +interface SearchMapCardProps extends ClassName { + map: Pick & { + numOfCrews: number + numOfPins: number + categories?: string[] + } +} + +const SearchMapCard = ({ map, className }: SearchMapCardProps) => { + return ( +
  • +
    + {map.name} + {map.categories && ( +
    + {map.categories.map((category) => ( + + ))} +
    + )} +
    + +
    +
    + + + Crew + + + {map.numOfCrews.toLocaleString()} + +
    + +
    + + + Pins + + + {map.numOfPins.toLocaleString()} + +
    +
    + + + {map.description} + +
  • + ) +} + +export default SearchMapCard diff --git a/src/app/map/search/search-menu-list.tsx b/src/app/map/search/search-menu-list.tsx new file mode 100644 index 00000000..02572880 --- /dev/null +++ b/src/app/map/search/search-menu-list.tsx @@ -0,0 +1,95 @@ +import type { IconKey } from '@/components/common/icon' +import Typography from '@/components/common/typography' +import type { ClassName } from '@/models/common' +import cn from '@/utils/cn' +import SearchIconChip from './search-icon-chip' + +interface SearchMenuListProps extends ClassName { + onClickMenu: (menu: string) => void +} + +const menus: { + icon: IconKey + label: string +}[] = [ + { + icon: '찜', + label: '찜, 탕, 찌개', + }, + { + icon: '일식', + label: '돈까스, 회, 일식', + }, + { + icon: '피자', + label: '피자', + }, + { + icon: '고기', + label: '고기, 구이', + }, + { + icon: '호프', + label: '호프/ 요리주점', + }, + { + icon: '양식', + label: '양식', + }, + { + icon: '치킨', + label: '치킨', + }, + { + icon: '중식', + label: '중식', + }, + { + icon: '아시안', + label: '아시안', + }, + { + icon: '백반', + label: '백반, 죽, 국수', + }, + { + icon: '분식', + label: '분식', + }, + { + icon: '카페', + label: '카페, 디저트', + }, + { + icon: '패스트푸드', + label: '패스트푸드', + }, +] + +const SearchMenuList = ({ className, onClickMenu }: SearchMenuListProps) => { + return ( +
    + + 메뉴 + + + +
    + ) +} + +export default SearchMenuList diff --git a/src/app/my-map/page.tsx b/src/app/my-map/page.tsx index d4aaeaeb..331494b3 100644 --- a/src/app/my-map/page.tsx +++ b/src/app/my-map/page.tsx @@ -39,16 +39,26 @@ const MyMap = () => { {myMapList?.map((map) => )} -
    +
    새로운 지도 + + + + + 지도 둘러보기 + +