import Link from "next/link"; import Image from "next/image"; import { SlotImage } from "@/components/SlotImage"; import { categories } from "@/lib/data"; import type { StaticImageWithUrl } from "@/lib/static-images"; import { slotAlt, slotAspectStyle } from "@/lib/static-images"; import { DrawFrame } from "./DrawFrame"; export function Categories({ images = [] }: { images?: StaticImageWithUrl[] }) { return (

دسته‌بندی‌ها

همه محصولات
{images.length > 0 ? images.map((image) => { const label = slotAlt(image); const card = (
{label || image.subtext ? ( {label ? ( {label} ) : null} {image.subtext ? ( {image.subtext} ) : null} ) : null}
); return image.linkUrl ? ( {card} ) : (
{card}
); }) : categories.map((cat) => ( {cat.name} {cat.name} {cat.english} ))}
); }