"use client"; import { motion } from "framer-motion"; import type { HeatmapPoint } from "@/hooks/use-heatmap-data"; interface HeatmapLayerProps { points: HeatmapPoint[]; projection: (coords: [number, number]) => [number, number] | null; onPointClick?: (point: HeatmapPoint) => void; } export function HeatmapLayer({ points, projection, onPointClick }: HeatmapLayerProps) { return ( {points.map((point, i) => { const coords = projection([point.lng, point.lat]); if (!coords) return null; const [x, y] = coords; const radius = Math.max(point.weight * 3, 4); return ( {/* Glow */} {/* Main dot */} onPointClick?.(point)} /> {/* Count label */} {point.clawCount > 1 && ( {point.clawCount} )} ); })} ); }