import type { StaticImageWithUrl } from "@/lib/static-images"; import { slotAlt, slotAspectStyle } from "@/lib/static-images"; type Props = { image: StaticImageWithUrl; alt?: string; className?: string; imgClassName?: string; aspectRatio?: string; fallbackAspect?: string; fill?: boolean; }; export function SlotImage({ image, alt, className = "", imgClassName, aspectRatio, fallbackAspect, fill = false, }: Props) { const style = fill ? undefined : slotAspectStyle(aspectRatio, fallbackAspect); const img = ( // Slot URLs come from Meshkee CDN and may not be in next/image remotePatterns. // eslint-disable-next-line @next/next/no-img-element {slotAlt(image, ); if (!image.linkUrl) { return className ?
{img}
: img; } return ( {img} ); }