|
@@ -1,5 +1,5 @@
|
|
|
"use client";
|
|
|
-import { GameListRep, getGameDetailApi } from "@/api/home";
|
|
|
+import { Category, GameListRep, getGameDetailApi } from "@/api/home";
|
|
|
import Box from "@/components/Box";
|
|
|
import { useRouter } from "@/i18n";
|
|
|
import { useWalletStore } from "@/stores/useWalletStore";
|
|
@@ -12,9 +12,10 @@ import styles from "./style.module.scss";
|
|
|
export interface CardProps {
|
|
|
item?: GameListRep;
|
|
|
render?: (value: GameListRep) => ReactNode;
|
|
|
+ group?: Category;
|
|
|
}
|
|
|
const Card: FC<PropsWithChildren<CardProps>> = (props) => {
|
|
|
- const { render, item } = props;
|
|
|
+ const { render, item, group } = props;
|
|
|
|
|
|
const t = useTranslations("Game");
|
|
|
const urlRef = useRef<string>("");
|
|
@@ -31,6 +32,7 @@ const Card: FC<PropsWithChildren<CardProps>> = (props) => {
|
|
|
if (!token) return;
|
|
|
const params = {
|
|
|
id: game.id,
|
|
|
+ mode: group?.bet_type,
|
|
|
};
|
|
|
getGameDetailApi(params).then((res) => {
|
|
|
urlRef.current = res.data?.game_url;
|