Skip to content

Commit c3630f8

Browse files
committed
feat: new power page
1 parent 3ff11dc commit c3630f8

File tree

2 files changed

+38
-5
lines changed

2 files changed

+38
-5
lines changed

src/renderer/src/modules/settings/tabs/wallet/my-wallet-section/index.tsx

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useWhoami } from "@renderer/atoms/user"
2-
import { Divider } from "@renderer/components/ui/divider"
2+
import { CopyButton } from "@renderer/components/ui/code-highlighter"
33
import { LoadingWithIcon } from "@renderer/components/ui/loading"
44
import {
55
Tooltip,
@@ -13,6 +13,7 @@ import { useWallet } from "@renderer/queries/wallet"
1313

1414
import { ClaimDailyReward } from "./claim-daily-reward"
1515
import { CreateWallet } from "./create-wallet"
16+
import { WithdrawButton } from "./withdraw"
1617

1718
export const MyWalletSection = () => {
1819
const user = useWhoami()
@@ -37,15 +38,28 @@ export const MyWalletSection = () => {
3738
return (
3839
<div className="space-y-8">
3940
<div>
40-
<SettingSectionTitle title="Balance" />
41-
<div className="flex items-end justify-between">
41+
<div className="text-sm">
42+
<p>Power is an ERC-20 token on the <a className="underline" target="_blank" href="https://scan.rss3.io/token/0xE06Af68F0c9e819513a6CD083EF6848E76C28CD8">VSL blockchain</a>.</p>
43+
<p>You can claim 2 free Power daily, which can be used to tip RSS entries on Follow.</p>
44+
</div>
45+
<SettingSectionTitle title="Your Address" />
46+
<div className="flex items-center gap-2 text-sm">
47+
<a href={`https://scan.rss3.io/address/${myWallet.address}`} target="_blank" className="underline">
48+
{myWallet.address}
49+
</a>
50+
<CopyButton value={myWallet.address!} className="p-1 [&_i]:size-2.5" />
51+
</div>
52+
<SettingSectionTitle title="Your Balance" />
53+
<div className="mb-2 flex items-end justify-between">
4254
<Balance className="text-xl font-bold text-accent">
4355
{BigInt(myWallet.dailyPowerToken || 0n) +
4456
BigInt(myWallet.cashablePowerToken || 0n)}
4557
</Balance>
46-
<ClaimDailyReward />
58+
<div className="flex gap-2">
59+
<WithdrawButton />
60+
<ClaimDailyReward />
61+
</div>
4762
</div>
48-
<Divider className="my-4" />
4963
<Tooltip>
5064
<TooltipTrigger className="block">
5165
<div className="flex flex-row items-center gap-x-2 text-xs text-zinc-600 dark:text-neutral-400">
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { TooltipTrigger } from "@radix-ui/react-tooltip"
2+
import { Button } from "@renderer/components/ui/button"
3+
import { Tooltip, TooltipContent } from "@renderer/components/ui/tooltip"
4+
5+
export const WithdrawButton = () => (
6+
<Tooltip>
7+
<TooltipTrigger>
8+
<Button
9+
variant="primary"
10+
disabled={true}
11+
>
12+
Withdraw
13+
</Button>
14+
</TooltipTrigger>
15+
<TooltipContent>
16+
Comming soon
17+
</TooltipContent>
18+
</Tooltip>
19+
)

0 commit comments

Comments
 (0)