import Image from "next/image"; import { cn } from "@/lib/utils"; const FALLBACK = "/dummy/news-2.jpg"; type Props = { src?: string | null; alt: string; className?: string; sizes?: string; }; /** Use inside a `relative` container with fixed height; covers area with `object-cover`. */ export default function ArticleThumbnail({ src, alt, className, sizes }: Props) { const url = src && String(src).trim().length > 0 ? String(src).trim() : FALLBACK; const isLocal = url.startsWith("/"); if (isLocal) { return ( {alt} ); } return ( {alt} ); }