import { useTheme } from "next-themes"; import { Image } from "@heroui/react"; import { useRef } from "react"; interface MiniPicProps { onClick?: () => void; showOverlay?: boolean; } const MiniPic = ({ onClick, showOverlay = false }: MiniPicProps) => { const { theme } = useTheme(); const isDark = theme === "dark"; const startPos = useRef<{ x: number; y: number } | null>(null); const handleStart = (x: number, y: number) => { startPos.current = { x, y }; }; const handleEnd = (x: number, y: number) => { if (!startPos.current) return; const dx = Math.abs(x - startPos.current.x); const dy = Math.abs(y - startPos.current.y); if (dx < 5 && dy < 5) { onClick?.(); } startPos.current = null; }; return (