@@ -3,14 +3,14 @@ import AddressCopy from '@/shared/components/button/AddressCopy';
33import LocationCard from '@/shared/components/container/LocationCard' ;
44import { Icon } from '@/shared/icons' ;
55import { cn } from '@/shared/lib' ;
6+ import { getLocation } from '@/shared/utils/handleGetLocation' ;
67import Image from 'next/image' ;
7-
88import { useRouter } from 'next/router' ;
99
1010const Board = ( ) => {
1111 const router = useRouter ( ) ;
1212 const { label } = router . query ;
13- const isStamp = true ; // 스탬프 획득 여부 (임시)
13+ const isStamp = true ;
1414
1515 return (
1616 < div className = 'relative w-full h-[100vh] overflow-auto px-[2.4rem]' >
@@ -34,14 +34,13 @@ const Board = () => {
3434
3535 < button
3636 className = { cn ( 'absolute bottom-0 right-0' , isStamp && 'p-[2.5rem]' ) }
37- onClick = { ( ) => {
38- //TODO: 리워드 페이지로 이동
39- // router.push({
40- // pathname: '/main/riward',
41- // query: { label },
42- // });
43- console . log ( '리워드 페이지로 이동' ) ;
44- } }
37+ onClick = { ( ) =>
38+ getLocation (
39+ ( pos ) => console . log ( '📍 현재 위치:' , pos . coords ) ,
40+ ( err ) => console . error ( '⚠️ 위치 에러:' , err . message ) ,
41+ //TODO : 리워드 페이지로 이동 , 위치 에러일경우 모달창
42+ )
43+ }
4544 >
4645 < Icon
4746 name = { isStamp ? 'Stamp' : 'PressStamp' }
@@ -58,6 +57,7 @@ const Board = () => {
5857 variant = 'mint'
5958 size = 'large'
6059 />
60+
6161 < AddressCopy
6262 variant = 'mint'
6363 value = '인천광역시 계양구 오조산로 31길(복사되어야할 주소)'
0 commit comments