|
@@ -16,6 +16,7 @@ import { getToken } from "@/utils/Cookies";
|
|
|
import { copyText, flatPoint } from "@/utils/methods";
|
|
|
import { useRequest } from "ahooks";
|
|
|
import { Mask, Toast } from "antd-mobile";
|
|
|
+import clsx from "clsx";
|
|
|
import { useTranslations } from "next-intl";
|
|
|
import Image from "next/image";
|
|
|
import { FC, useEffect, useRef, useState } from "react";
|
|
@@ -234,7 +235,6 @@ const App: FC<Props> = (props) => {
|
|
|
|
|
|
const { data: todayData } = useRequest(getUserMoneyHandler, {
|
|
|
pollingInterval: TIME,
|
|
|
- pollingWhenHidden: true,
|
|
|
pollingErrorRetryCount: 3,
|
|
|
staleTime: 5000,
|
|
|
refreshDeps: [token],
|
|
@@ -279,7 +279,6 @@ const App: FC<Props> = (props) => {
|
|
|
|
|
|
const { data: commissionData, run: commissionRun } = useRequest(getCommission, {
|
|
|
pollingInterval: TIME,
|
|
|
- pollingWhenHidden: true,
|
|
|
pollingErrorRetryCount: 3,
|
|
|
staleTime: 5000,
|
|
|
});
|
|
@@ -477,7 +476,13 @@ const App: FC<Props> = (props) => {
|
|
|
</li>
|
|
|
</ul>
|
|
|
<div className="wallet">
|
|
|
- <div className="btn" onClick={withdrawalHandler}>
|
|
|
+ <div
|
|
|
+ className={clsx(
|
|
|
+ "btn",
|
|
|
+ !commissionData?.enable_receive ? "btn-disable" : ""
|
|
|
+ )}
|
|
|
+ onClick={withdrawalHandler}
|
|
|
+ >
|
|
|
{t("TRANSFERIR")}
|
|
|
</div>
|
|
|
<div className="tip">
|