import Link from "next/link"; import { SHOP_ENABLED } from "@/lib/shop-config"; import type { Product } from "@/lib/types"; /** * CrossSell — sekcja cross-sell "Uzupełnij kolekcję" na PDP. * Pokazuje produkty z innej kolekcji (nie aktualnej). */ export function CrossSell({ currentProduct, allProducts, version = "v2", }: { currentProduct: Product; allProducts: Product[]; version?: string; }) { const others = allProducts.filter((p) => p.sku !== currentProduct.sku); if (others.length === 0) return null; return (

Uzupełnij kolekcję

{others.map((p) => { const firstVariant = p.variants[0]; return (
{/* eslint-disable-next-line @next/next/no-img-element */} {p.name}

{p.collection}

{p.name}

{SHOP_ENABLED && (

{p.base_price.toLocaleString("pl-PL")} zł

)}
); })}
); }