import Link from "next/link"; import Image from "next/image"; import type { ProductCardBlockValue } from "@/types/wagtail"; export default function ProductCardGrid({ value }: { value: ProductCardBlockValue }) { return (
{value.heading && (

{value.heading}

)}
{value.items?.map((item, index) => { const card = (
{item.image && ( {item.image.title} )}

{item.title}

{item.description && (

{item.description}

)}
); const key = `${item.title}-${index}`; return item.link ? ( {card} ) : (
{card}
); })}
); }