From b13f21fc7ee8a808addbada0aa6f4b3b60b0a973 Mon Sep 17 00:00:00 2001 From: Innei Date: Thu, 11 Jul 2024 16:21:20 +0800 Subject: [PATCH] fix: wallet tooltip bug Signed-off-by: Innei --- .gitignore | 1 + .../tabs/wallet/my-wallet-section/index.tsx | 59 ++++++++++++++----- .../tabs/wallet/transaction-section/index.tsx | 14 ++--- 3 files changed, 50 insertions(+), 24 deletions(-) diff --git a/.gitignore b/.gitignore index 749613ac32..499d72cd64 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ out # Sentry Config File .env.sentry-build-plugin +.vercel diff --git a/src/renderer/src/modules/settings/tabs/wallet/my-wallet-section/index.tsx b/src/renderer/src/modules/settings/tabs/wallet/my-wallet-section/index.tsx index b5bfb02a15..813506af8d 100644 --- a/src/renderer/src/modules/settings/tabs/wallet/my-wallet-section/index.tsx +++ b/src/renderer/src/modules/settings/tabs/wallet/my-wallet-section/index.tsx @@ -1,7 +1,12 @@ import { useUser } from "@renderer/atoms/user" import { Divider } from "@renderer/components/ui/divider" import { LoadingCircle } from "@renderer/components/ui/loading" -import { Tooltip, TooltipContent, TooltipTrigger } from "@renderer/components/ui/tooltip" +import { + Tooltip, + TooltipContent, + TooltipPortal, + TooltipTrigger, +} from "@renderer/components/ui/tooltip" import { Balance } from "@renderer/components/ui/wallet/balance" import { SettingSectionTitle } from "@renderer/modules/settings/section" import { useWallet } from "@renderer/queries/wallet" @@ -17,7 +22,9 @@ export const MyWalletSection = () => { return (
{wallet.isPending ? ( - +
+ +
) : !myWallet ? ( @@ -27,35 +34,57 @@ export const MyWalletSection = () => {
- {BigInt(myWallet.dailyPowerToken || 0n) + BigInt(myWallet.cashablePowerToken || 0n)} + + {BigInt(myWallet.dailyPowerToken || 0n) + + BigInt(myWallet.cashablePowerToken || 0n)} +
- Daily Power + + Daily Power + + {myWallet.dailyPowerToken} - +
- -

1. Daily Power can only be used for tips.

-

2. It comes from the Power you claim for free every day..

-
+ + +

1. Daily Power can only be used for tips.

+

+ 2. It comes from the Power you claim for free every day.. +

+
+
- Cashable Power + + Cashable Power + {" "} + + + {myWallet.cashablePowerToken} -
- -

1. You can transfer Cashable Power to your wallet and trade freely.

-

2. It comes from the Power you recharge and the tips you receive.

-
+ + +

+ 1. You can transfer Cashable Power to your wallet and trade + freely. +

+

+ 2. It comes from the Power you recharge and the tips you + receive. +

+
+
diff --git a/src/renderer/src/modules/settings/tabs/wallet/transaction-section/index.tsx b/src/renderer/src/modules/settings/tabs/wallet/transaction-section/index.tsx index 78d26e22a9..e51227d37a 100644 --- a/src/renderer/src/modules/settings/tabs/wallet/transaction-section/index.tsx +++ b/src/renderer/src/modules/settings/tabs/wallet/transaction-section/index.tsx @@ -21,7 +21,7 @@ export const TransactionsSection = () => { // if (transactions.data?.length === 0) return
No transactions
return ( -
+
@@ -114,22 +114,18 @@ const UserRenderer = ({ user }: { user?: NonNullable - {user?.name?.slice(0, 2)} + {name?.slice(0, 2)}
- {isMe ? You : user?.name || "NULL"} + {isMe ? You : name}
) } - -// const FeedRenderer = ({ feed }: { feed: NonNullable["data"]>[number]["toFeed"] }) => ( -//
-// {feed?.title ?? "-"} -//
-// )