|
@@ -214,24 +214,25 @@ const Sidebar: FC<PropsWithChildren<Props>> = (props) => {
|
|
|
|
|
|
const walletCfg = useMemo(() => {
|
|
|
const result: any = [
|
|
|
- {
|
|
|
- text: "Saldo",
|
|
|
- icon: "/sidebar/saldo.webp",
|
|
|
- textStyle: { fontSize: ".12rem" },
|
|
|
- value: wallet.score || 0,
|
|
|
- },
|
|
|
- {
|
|
|
- text: "Bônus",
|
|
|
- icon: "/sidebar/bonus.webp",
|
|
|
- textStyle: { fontSize: ".12rem" },
|
|
|
- value: wallet.point || 0,
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // text: "Saldo",
|
|
|
+ // icon: "/sidebar/saldo.webp",
|
|
|
+ // textStyle: { fontSize: ".12rem" },
|
|
|
+ // value: wallet.score || 0,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // text: "Bônus",
|
|
|
+ // icon: "/sidebar/bonus.webp",
|
|
|
+ // textStyle: { fontSize: ".12rem" },
|
|
|
+ // value: wallet.point || 0,
|
|
|
+ // },
|
|
|
];
|
|
|
if (show_free_game === 1) {
|
|
|
result.push({
|
|
|
text: "Carteira grátis",
|
|
|
icon: "/sidebar/free.webp",
|
|
|
value: wallet.free_score || 0,
|
|
|
+ url: "/freeGames",
|
|
|
});
|
|
|
}
|
|
|
if (show_again_game === 1) {
|
|
@@ -240,6 +241,7 @@ const Sidebar: FC<PropsWithChildren<Props>> = (props) => {
|
|
|
icon: "/sidebar/money.webp",
|
|
|
textStyle: { fontSize: ".09rem" },
|
|
|
value: wallet.lose_score || 0,
|
|
|
+ url: "/replayGames",
|
|
|
});
|
|
|
}
|
|
|
return result;
|
|
@@ -330,33 +332,50 @@ const Sidebar: FC<PropsWithChildren<Props>> = (props) => {
|
|
|
{/* <img src="/home/placehold.webp" alt="" /> */}
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div className={clsx(styles.sideTitle, "mt-[.06rem]")}>
|
|
|
- <i
|
|
|
- className={clsx("iconfont icon-qianbao11 text-[.26rem]", styles.icon)}
|
|
|
- ></i>
|
|
|
- <span>Carteira</span>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div className={styles.qianbao}>
|
|
|
- {walletCfg.map((item: any) => {
|
|
|
- return (
|
|
|
- <div key={item.text} className={styles.qianbaoItem}>
|
|
|
- <img className="mr-[.06rem] w-[.3rem]" src={item.icon} alt="" />
|
|
|
- <div>
|
|
|
- <div className="text-[.16rem] leading-[1.2]">
|
|
|
- {item.value}R
|
|
|
- </div>
|
|
|
- <div
|
|
|
- className="text-[.1rem] leading-[1]"
|
|
|
- style={{ ...(item.textStyle || {}) }}
|
|
|
+ {walletCfg?.length && (
|
|
|
+ <>
|
|
|
+ <div className={clsx(styles.sideTitle, "mt-[.06rem]")}>
|
|
|
+ <i
|
|
|
+ className={clsx(
|
|
|
+ "iconfont icon-qianbao11 text-[.26rem]",
|
|
|
+ styles.icon
|
|
|
+ )}
|
|
|
+ ></i>
|
|
|
+ <span>Carteira</span>
|
|
|
+ </div>
|
|
|
+ <div className={styles.qianbao}>
|
|
|
+ {walletCfg.map((item: any) => {
|
|
|
+ return (
|
|
|
+ <Link
|
|
|
+ href={item.url}
|
|
|
+ key={item.text}
|
|
|
+ prefetch
|
|
|
+ onClick={() => setCollapse(false)}
|
|
|
+ className={styles.qianbaoItem}
|
|
|
>
|
|
|
- {item.text}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- );
|
|
|
- })}
|
|
|
- </div>
|
|
|
+ <img
|
|
|
+ className="mr-[.06rem] w-[.3rem]"
|
|
|
+ src={item.icon}
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
+ <div>
|
|
|
+ <div className="text-[.16rem] leading-[1.2]">
|
|
|
+ {item.value}R
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ className="text-[.1rem] leading-[1]"
|
|
|
+ style={{ ...(item.textStyle || {}) }}
|
|
|
+ >
|
|
|
+ {item.text}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </Link>
|
|
|
+ );
|
|
|
+ })}
|
|
|
+ </div>
|
|
|
+ </>
|
|
|
+ )}
|
|
|
+
|
|
|
{cardData.length > 0 && (
|
|
|
<div className={clsx(styles.sideTitle, "my-[.06rem]")}>
|
|
|
<i
|
|
@@ -375,6 +394,10 @@ const Sidebar: FC<PropsWithChildren<Props>> = (props) => {
|
|
|
actionData={item.action_params}
|
|
|
className={styles.promoItem}
|
|
|
onBeforeHandler={() => registePromo(item.id)}
|
|
|
+ pb={false}
|
|
|
+ pt={false}
|
|
|
+ pl={false}
|
|
|
+ pr={false}
|
|
|
>
|
|
|
<div
|
|
|
key={item.id}
|