This commit is contained in:
@@ -70,7 +70,19 @@ function CategoryImage({
|
||||
);
|
||||
}
|
||||
|
||||
return <img src={src} width={size} height={size} alt={alt} loading="lazy" />;
|
||||
return (
|
||||
// eslint-disable-next-line @next/next/no-img-element
|
||||
<img
|
||||
src={src}
|
||||
width={size}
|
||||
height={size}
|
||||
alt={alt}
|
||||
loading="lazy"
|
||||
onError={(event) => {
|
||||
event.currentTarget.src = "/assets/images/food-image.png";
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
type Variant = "large" | "small";
|
||||
|
||||
Reference in New Issue
Block a user