This commit is contained in:
gpatruno
2026-06-11 17:30:13 +02:00
parent 36b4acb355
commit e45e9f154e
108 changed files with 9163 additions and 167 deletions
+33
View File
@@ -0,0 +1,33 @@
import Image from "next/image";
import { isUploadAssetPath } from "@/lib/image-url";
type Props = {
src: string;
alt: string;
};
export function WaffleMenuImage({ src, alt }: Props) {
if (src.startsWith("http://") || src.startsWith("https://")) {
return (
// eslint-disable-next-line @next/next/no-img-element -- URLs externes arbitraires
<img
src={src}
alt={alt}
className="h-full w-full object-cover"
loading="lazy"
referrerPolicy="no-referrer"
/>
);
}
return (
<Image
src={src}
alt={alt}
fill
unoptimized={isUploadAssetPath(src)}
className="object-cover"
sizes="(max-width: 640px) 100vw, 50vw"
/>
);
}