-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMap.tsx
More file actions
40 lines (35 loc) · 1009 Bytes
/
Map.tsx
File metadata and controls
40 lines (35 loc) · 1009 Bytes
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
39
40
import { Header } from '@/shared/components';
import { useRouter } from 'next/router';
import FullMap from '@/shared/components/map/result/components/FullMap';
const MapPage = () => {
const router = useRouter();
const sessionId = Array.isArray(router.query.sessionId)
? router.query.sessionId[0]
: router.query.sessionId;
return (
<main
className="w-full h-[100vh] bg-mint-300 overflow-hidden"
role="main"
aria-label="코스 추천 지도 페이지"
>
<Header
title="코스 추천"
onClick={() => {
if (window.history.length > 1) {
router.back();
} else {
router.push('/map');
}
}}
/>
{sessionId ? (
<FullMap sessionId={sessionId} />
) : (
<div className="flex h-full items-center justify-center text-gray-600 text-title-sm bg-gray-200">
코스 정보가 없습니다
</div>
)}
</main>
);
};
export default MapPage;