무엇을 도와드릴까요?
diff --git a/src/components/customer-support/SupportModal.tsx b/src/components/customer-support/SupportModal.tsx
index 800ab56..c8c4430 100644
--- a/src/components/customer-support/SupportModal.tsx
+++ b/src/components/customer-support/SupportModal.tsx
@@ -15,7 +15,6 @@ import { useMutation } from "@tanstack/react-query";
import { postInquiry } from "@/api/inquiry";
import { getErrorMessage } from "@/utils/error";
-
interface SupportModalProps {
isOpen: boolean;
onClose: () => void;
diff --git a/src/components/customer-support/faqData.ts b/src/components/customer-support/faqData.ts
index e355448..c1b4ba5 100644
--- a/src/components/customer-support/faqData.ts
+++ b/src/components/customer-support/faqData.ts
@@ -1,4 +1,4 @@
-export interface FaqItem {
+interface FaqItem {
id: number;
category: string;
question: string;
diff --git a/src/components/map/KakaoMap.tsx b/src/components/map/KakaoMap.tsx
index 83776f8..e812e06 100644
--- a/src/components/map/KakaoMap.tsx
+++ b/src/components/map/KakaoMap.tsx
@@ -1,10 +1,14 @@
import { loadKakaoMapSdk } from "@/lib/kakao";
+import type {
+ KakaoInfoWindowInstance,
+ KaKaoMapInstance,
+ KakaoMarkerInstance,
+ LatLng,
+ MarkerWithLocation,
+} from "@/types/map";
import type { RestaurantSummary } from "@/types/store";
import { useEffect, useMemo, useRef, useState } from "react";
-type LatLng = { lat: number; lng: number };
-type MarkerWithLocation = RestaurantSummary & { location: LatLng };
-
type Props = {
center: LatLng;
markers: RestaurantSummary[];
@@ -14,22 +18,17 @@ type Props = {
defaultLevel?: number;
selectedLevel?: number;
};
-declare global {
- interface Window {
- kakao: any;
- }
-}
-
const toNum = (v: unknown) => {
const n = typeof v === "string" ? parseFloat(v) : Number(v);
return Number.isFinite(n) ? n : null;
};
-const normalizeLatLng = (loc: any): LatLng | null => {
- if (!loc) return null;
+const normalizeLatLng = (loc: unknown): LatLng | null => {
+ if (!loc || typeof loc !== "object") return null;
+ const maybeLoc = loc as { lat?: unknown; lng?: unknown };
- let lat = toNum(loc.lat);
- let lng = toNum(loc.lng);
+ let lat = toNum(maybeLoc.lat);
+ let lng = toNum(maybeLoc.lng);
if (lat == null || lng == null) return null;
@@ -52,17 +51,17 @@ export default function KakaoMap({
selectedLevel,
}: Props) {
const containerRef = useRef(null);
- const mapRef = useRef(null);
- const markersRef = useRef