import { downloadFile } from "@/core/utils/helpers/downloadFile";
import { useImageUpload } from "@/core/utils/hooks/useImageUpload";
import { useCallback } from "react";
import Cross from "../Icons/Cross";
import Download from "../Icons/Download";
import Image from "next/image"; // Assuming you're using Next.js for the optimized component
interface ImgCardProps {
image: string;
date: string;
}
export default function ImgCard(props: Readonly): JSX.Element {
const { image, date } = props;
const { deleteImage } = useImageUpload();
// Memoize the download handler so it's not re-created on every render
const handleDownload = useCallback(() => {
downloadFile(image, "");
}, [image]);
return (
);
}