import { downloadFile } from "@/core/utils/helpers/file"; import { useImageUpload } from "@/core/utils/hooks/useImageUpload"; import { useCallback, type JSX } from "react"; import { useParams } from "next/navigation"; import Cross from "../Icons/Cross"; import Download from "../Icons/Download"; import Image from "next/image"; interface ImgCardProps { image: string; date: string; } type Params = { modelId?: string }; export default function ImgCard(props: Readonly): JSX.Element { const { image, date } = props; const { modelId } = useParams(); const { deleteImage } = useImageUpload(); // Memoize the download handler so it's not re-created on every render const handleDownload = useCallback(() => { downloadFile(image, ""); }, [image]); return (
screenshot

Screenshot {date}

); }