import { fallImg } from "@/utils";

interface AvatarProps extends React.ImgHTMLAttributes<HTMLImageElement> { }

/** 防止掉圖時 上個預設圖 */
const Image = (props: AvatarProps) => {
	function onError(event: any) {
		event.target.src = fallImg;
	}
	return (
		<img {...props} onError={onError} />
	);
};

export default Image;