"use client"; import { getUserMoneyApi } from "@/api/user"; import { useRequest } from "ahooks"; import { Mask } from "antd-mobile"; import { motion } from "framer-motion"; import { useState } from "react"; import styles from "./activityMask.module.scss"; const ActivityMask = () => { const [count, setCount] = useState(0); // const wallet = useWalletStore((state) => state.wallet); // useEffect(() => { // if (wallet?.notice?.lose_score > 0) { // setVisible(true); // } // }, [wallet?.notice?.lose_score]); const { run, cancel } = useRequest(getUserMoneyApi, { pollingInterval: 5000, pollingWhenHidden: true, pollingErrorRetryCount: 3, staleTime: 5000, onError: (error) => {}, onSuccess: (res) => { if (res.data.notice.lose_score > 0) { setCount(res.data.notice.lose_score); cancel(); } }, }); return ( { setCount(0); run(); }} > {/* setVisible(false)}*/} {/*>*/} {/* */} {/**/}
{ setCount(0); run(); }} >
{""}
PRESENTE
R${count}

Não tive sorte hoje,

Continue com o bom trabalho

); }; export default ActivityMask;