+
+
+
+
+ {BigInt(myWallet.dailyPowerToken || 0n) +
+ BigInt(myWallet.cashablePowerToken || 0n)}
+
+
- ) : !myWallet ?
- (
-
- ) :
- (
-
-
-
-
-
- {BigInt(myWallet.dailyPowerToken || 0n) +
- BigInt(myWallet.cashablePowerToken || 0n)}
-
-
-
-
-
-
-
-
- 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..
-
-
-
-
-
-
-
-
- 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.
-
-
-
-
-
+
+
+
+
+
+ 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..
+
+
+
+
+
+
+
+ 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.
+
+
+
+
+
)
}
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 f34706d5d..18929f24d 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
@@ -5,6 +5,8 @@ import {
AvatarFallback,
AvatarImage,
} from "@renderer/components/ui/avatar"
+import { RelativeTime } from "@renderer/components/ui/datetime"
+import { LoadingCircle } from "@renderer/components/ui/loading"
import {
Table,
TableBody,
@@ -17,7 +19,6 @@ import { Balance } from "@renderer/components/ui/wallet/balance"
import { cn } from "@renderer/lib/utils"
import { SettingSectionTitle } from "@renderer/modules/settings/section"
import { useWallet, useWalletTransactions } from "@renderer/queries/wallet"
-import dayjs from "dayjs"
export const TransactionsSection = () => {
const user = useMe()
@@ -26,9 +27,15 @@ export const TransactionsSection = () => {
const transactions = useWalletTransactions({ fromOrToUserId: user?.id })
- if (!myWallet) return
+ if (!myWallet) return null
- if (transactions.isLoading) { return
Loading...
}
+ if (transactions.isLoading) {
+ return (
+
+
+
+ )
+ }
// if (transactions.data?.length === 0) return
No transactions
@@ -40,11 +47,21 @@ export const TransactionsSection = () => {
- Type
- Amount
- From
- To
- Date
+
+ Type
+
+
+ Amount
+
+
+ From
+
+
+ To
+
+
+ Date
+
@@ -67,7 +84,7 @@ export const TransactionsSection = () => {
{/* */}
- {dayjs(row.createdAt).fromNow()}
+
))}