import Image from "next/image"; import Link from "next/link"; import { getFullImageUrl } from "@/app/utils/functions"; export interface ProductCardServerProps { id: string; name: string; image: string; href: string; price: number; category: string; onSale?: boolean; skus?: Array | string; } export function ProductCardServer({ id, name, image, href, price, category, onSale, skus, }: ProductCardServerProps) { const fallbackImage = "/no-image-avail-large.png"; const fullImageUrl = getFullImageUrl(image) || fallbackImage; const sku = Array.isArray(skus) ? skus[0] : skus; return ( {onSale ? ( Sale ) : null}
{name}

{category}

{name}

{sku ? (

PART #: {sku}

) : null}
${price.toFixed(2)}
); }