From d07ec236e5c90165638ab341623400f8f661d49d Mon Sep 17 00:00:00 2001 From: DIYgod Date: Mon, 24 Feb 2025 12:04:20 +0800 Subject: [PATCH] feat: optional daily --- .../modules/power/my-wallet-section/index.tsx | 62 ++++++++++--------- 1 file changed, 34 insertions(+), 28 deletions(-) diff --git a/apps/renderer/src/modules/power/my-wallet-section/index.tsx b/apps/renderer/src/modules/power/my-wallet-section/index.tsx index 6f153e56a..205822193 100644 --- a/apps/renderer/src/modules/power/my-wallet-section/index.tsx +++ b/apps/renderer/src/modules/power/my-wallet-section/index.tsx @@ -11,6 +11,7 @@ import { cn } from "@follow/utils/utils" import { useMutation } from "@tanstack/react-query" import { Trans, useTranslation } from "react-i18next" +import { useServerConfigs } from "~/atoms/server-configs" import { CopyButton } from "~/components/ui/button/CopyButton" import { apiClient } from "~/lib/api-fetch" import { getBlockchainExplorerUrl } from "~/lib/utils" @@ -30,6 +31,7 @@ export const MyWalletSection = ({ className }: { className?: string }) => { const wallet = useWallet() const myWallet = wallet.data?.[0] + const serverConfigs = useServerConfigs() const rewardDescriptionModal = useRewardDescriptionModal() const refreshMutation = useMutation({ @@ -133,35 +135,39 @@ export const MyWalletSection = ({ className }: { className?: string }) => { - - -
{t("wallet.power.rewardDescription")}
-
- - {BigInt(myWallet.todayDailyPower || 0n)} - - ), - Link:
-
-
-
- - + {!!serverConfigs?.DAILY_POWER_SUPPLY && ( + <> + + +
{t("wallet.power.rewardDescription")}
+
+ + {BigInt(myWallet.todayDailyPower || 0n)} + + ), + Link:
- - {BigInt(myWallet.todayDailyPower || 0n)} -
- -
+
+
+
+ + +
+ + {BigInt(myWallet.todayDailyPower || 0n)} +
+ +
+ + )}
) }