-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathNode.tsx
More file actions
80 lines (73 loc) · 2.41 KB
/
Node.tsx
File metadata and controls
80 lines (73 loc) · 2.41 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import { AddressCopy, Header, LocationCard } from '@/shared/components';
import { Icon } from '@/shared/icons';
import { cn } from '@/shared/lib';
import { getLocation } from '@/shared/utils/handleGetLocation';
import Image from 'next/image';
import { useRouter } from 'next/router';
const Board = () => {
const router = useRouter();
const { label } = router.query;
const isStamp = false;
return (
<div className='relative w-full h-[100vh] overflow-auto px-[2.4rem]'>
<Header
title={label ? String(label) : '노드'}
onClick={() => router.back()}
/>
<main
className='relative pt-[14.3rem] gap-[1.2rem] flex flex-col '
role="main"
aria-label={`${label ? label : '노드'} 상세 페이지`}
>
<section className='relative w-full'>
<Image
src='/assets/board.svg'
alt='보드판'
width={354}
height={436}
className={cn(
'w-full h-auto object-cover block rounded-[16px] transition-all duration-300',
!isStamp && 'blur-xs brightness-90',
)}
/>
<button
aria-label={isStamp ? '스탬프 획득 완료' : '스탬프 찍기'}
className={cn('absolute bottom-0 right-0', isStamp && 'p-[2.5rem]')}
onClick={
!isStamp
? () => {
getLocation(
(pos) => console.log('📍 현재 위치:', pos.coords),
(err) => console.error('⚠️ 위치 에러:', err.message),
);
router.push({
pathname: '/main/HiddenReward',
});
}
: undefined
}
>
<Icon
name={isStamp ? 'Stamp' : 'PressStamp'}
color={isStamp ? 'pink-400' : 'gray-50'}
size={isStamp ? 100 : 160}
aria-hidden="true"
/>
</button>
</section>
<LocationCard
name={label ? String(label) : '노드'}
address='주소'
description='장소에 대한 설명'
variant='mint'
size='large'
/>
<AddressCopy
variant='mint'
value='인천광역시 계양구 오조산로 31길(복사되어야할 주소)'
/>
</main>
</div>
);
};
export default Board;