"use client"; import Image, { ImageProps } from "next/image"; import { useState } from "react"; interface ImageWithFallbackProps extends Omit { src: string; alt: string; fallbackSrc?: string; } export default function ImageWithFallback({ src, alt, fallbackSrc = "/clipboard.svg", ...props }: ImageWithFallbackProps) { const [imgSrc, setImgSrc] = useState(src); return ( {alt} setImgSrc(fallbackSrc)} /> ); }