Skip to content

Commit

Permalink
Fix: 배포환경 카카오 지도 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaeYubin committed Jul 31, 2024
1 parent 1a595b8 commit 30df9c5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/hooks/custom/useCafesMarkers.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { useEffect, useState } from 'react';
import { Cafe } from '@/types/map';

Expand Down Expand Up @@ -31,7 +33,7 @@ const useCafesMarkers = (
// 상세 정보를 표시하는 클로저를 만드는 함수
function makeClickListener() {
return function () {
console.log('click');
console.log(cafe);
setCafeInfo(cafe);
// setShowInfo(true);
// setClickListener((old) => !old);
Expand Down
2 changes: 2 additions & 0 deletions src/hooks/custom/useKakaoMap.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { useEffect, useRef, useState } from 'react';
import { KAKAO_APP_KEY } from '@/constants/env';
import {
Expand Down
3 changes: 3 additions & 0 deletions src/hooks/custom/usePanToCafe.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { useEffect } from 'react';
import { Cafe } from '@/types/map';

Expand All @@ -10,6 +12,7 @@ const usePanToCafe = (
) => {
useEffect(() => {
if (cafeInfo && mapObject) {
console.log(cafeInfo);
setTimeout(() => {
mapObject.relayout();

Expand Down

0 comments on commit 30df9c5

Please sign in to comment.