-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathResultMap.tsx
More file actions
38 lines (33 loc) · 1.11 KB
/
ResultMap.tsx
File metadata and controls
38 lines (33 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
'use client';
import { useRef } from 'react';
import { useRouter } from 'next/router';
import { useKakaoMap } from '@/shared/hooks/kakao/useKakaoMap';
import { MAP_LOCATIONS } from '@/shared/constants/map/result/mapLocations';
export default function ResultMap() {
const mapRef = useRef<HTMLDivElement | null>(null);
const router = useRouter();
useKakaoMap(mapRef, MAP_LOCATIONS);
return (
<section
className="relative w-full h-[43.6rem] rounded-[2rem] overflow-hidden bg-gray-200"
role="region"
aria-labelledby="map-title"
>
<h2 id="map-title" className="sr-only">
코스 추천 미리보기 지도
</h2>
<div
ref={mapRef}
role="application"
className="w-full h-full"
/>
<button
onClick={() => router.push('/map/result/Map?from=map')}
aria-labelledby="전체화면 지도로 보기"
className="absolute right-[1.2rem] bottom-[1.4rem] bg-pink-200 border border-pink-300 text-white text-title-sm px-[2.2rem] py-[1.2rem] rounded-[2rem]"
>
전체화면 보기
</button>
</section>
);
}