year 2 dni temu
rodzic
commit
f738e3cd31

BIN
public/img/game_placeholder.webp


BIN
public_original/img/game_placeholder.png


+ 16 - 4
src/components/Image/index.tsx

@@ -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;