import { useSubCategory } from "@/store/useSubCategory"; import { useLocale } from "next-intl"; import Image from "next/image"; import Link from "next/link"; import { useRouter } from "next/navigation"; interface ProductCardProps { id: number; category: number; title: string; image: string; slug: string; } export default function Card({ title, image, slug, id, category, }: ProductCardProps) { const locale = useLocale(); const router = useRouter(); const setSubCategory = useSubCategory((state) => state.setSubCategory); const handleClick = (e: React.MouseEvent) => { e.preventDefault(); setSubCategory({ id, name: title, image, category, }); router.push(`/${locale}/catalog_page/products`); }; return (
{/* Image Container */}
{title}
{/* Content Container */}

{title}

); }