|
@@ -11,15 +11,27 @@ const CustomImage = ({ onError, src, ...props }: ImageProps) => {
|
|
|
if (isError) {
|
|
|
return (
|
|
|
<div className="flex h-[100%] flex-col items-center justify-center text-center">
|
|
|
- <i className="iconfont icon-jinbi text-[.3rem] text-[var(--textColor1)]"></i>
|
|
|
- <span className="text-[11px] leading-[1] text-[var(--textColor1)]">
|
|
|
+ <img src="/img/game_placeholder.webp" className="w-[.5rem]" alt="" />
|
|
|
+ {/* <span className="text-[11px] leading-[1] text-[var(--textColor1)]">
|
|
|
Falha no carregamento
|
|
|
- </span>
|
|
|
+ </span> */}
|
|
|
</div>
|
|
|
);
|
|
|
}
|
|
|
// eslint-disable-next-line jsx-a11y/alt-text
|
|
|
- return <Image {...props} src={src} onError={onErrorHandler}></Image>;
|
|
|
+ return (
|
|
|
+ <Image
|
|
|
+ {...props}
|
|
|
+ src={src}
|
|
|
+ onError={onErrorHandler}
|
|
|
+ placeholder={
|
|
|
+ <div className="flex h-full items-center justify-center">
|
|
|
+ <img src="/img/game_placeholder.webp" className="w-[.5rem]" alt="" />
|
|
|
+ </div>
|
|
|
+ }
|
|
|
+ alt={props.alt || ""}
|
|
|
+ ></Image>
|
|
|
+ );
|
|
|
};
|
|
|
|
|
|
export default CustomImage;
|