Parcourir la source

fix: 增加钱包页面

Before il y a 9 mois
Parent
commit
17ab81c9af

+ 3 - 1
src/app/[locale]/(TabBar)/(ordinary)/profile/ProfileHeader.tsx

@@ -1,6 +1,6 @@
 "use client";
 import { UserInfoRep, UserVipInfo, Wallet } from "@/api/user";
-import { Link } from "@/i18n";
+import { Link, useRouter } from "@/i18n";
 import { percentage } from "@/utils/methods";
 import { ProgressBar } from "antd-mobile";
 import { useTranslations } from "next-intl";
@@ -77,6 +77,7 @@ const WalletCard = (props: { userMoney: Wallet }) => {
     const { userMoney } = props;
     const t = useTranslations("ProfilePage");
     const [visible, setVisible] = useState(false);
+    const router = useRouter();
 
     const callbackFun = () => {
         setVisible(!visible);
@@ -84,6 +85,7 @@ const WalletCard = (props: { userMoney: Wallet }) => {
 
     const walletHandler = (key: string) => {
         console.log(`🚀🚀🚀🚀🚀-> in ProfileHeader.tsx on 86`, key);
+        router.push("/wallet");
     };
     return (
         <>