|
@@ -1,11 +1,12 @@
|
|
|
"use client";
|
|
|
import { Category, GameListRep, GameRequest, toggleFavorite } from "@/api/home";
|
|
|
import { userInfoApi } from "@/api/login";
|
|
|
+import CustomImage from "@/components/Image";
|
|
|
import useGame from "@/hooks/useGame";
|
|
|
import { useRouter } from "@/i18n/routing";
|
|
|
import { useWalletStore } from "@/stores/useWalletStore";
|
|
|
import { getToken } from "@/utils/Cookies";
|
|
|
-import { Button, Image, Popup, Toast } from "antd-mobile";
|
|
|
+import { Button, Popup, Toast } from "antd-mobile";
|
|
|
import clsx from "clsx";
|
|
|
import { useTranslations } from "next-intl";
|
|
|
import { FC, PropsWithChildren, ReactNode, useEffect, useRef, useState } from "react";
|
|
@@ -172,14 +173,21 @@ const Card: FC<PropsWithChildren<CardProps>> = (props) => {
|
|
|
className={clsx(styles.cardWrap, className, "overflow-hidden")}
|
|
|
onClick={() => handler(item!)}
|
|
|
>
|
|
|
- <Image
|
|
|
+ {/* <Image
|
|
|
// lazy={true}
|
|
|
src={item?.game_icon}
|
|
|
alt={item?.game_name_cn}
|
|
|
width={"100%"}
|
|
|
height={"100%"}
|
|
|
className={"h-[100%] w-[100%]"}
|
|
|
- />
|
|
|
+ /> */}
|
|
|
+ <CustomImage
|
|
|
+ src={item?.game_icon}
|
|
|
+ alt={item?.game_name_cn}
|
|
|
+ width={"100%"}
|
|
|
+ height={"100%"}
|
|
|
+ className={"h-[100%] w-[100%]"}
|
|
|
+ ></CustomImage>
|
|
|
{props.isShowOnline && item?.online_user && (
|
|
|
<div className={styles.cardOnline}>{item?.online_user}</div>
|
|
|
)}
|
|
@@ -218,7 +226,7 @@ const Card: FC<PropsWithChildren<CardProps>> = (props) => {
|
|
|
>
|
|
|
<div className={"w-1/1 flex w-[4.02rem] flex-1 px-spacing-x py-spacing-y"}>
|
|
|
<div className={styles.cardWrap} style={{ width: "1.1rem" }}>
|
|
|
- <Image
|
|
|
+ <CustomImage
|
|
|
src={item?.game_icon}
|
|
|
alt={item?.game_name + "-" + item?.category_name}
|
|
|
className={"h-[100%] w-[100%]"}
|