|
1 | 1 | "use client"; |
2 | 2 |
|
3 | 3 | import { ConnectButton } from "@rainbow-me/rainbowkit"; |
4 | | -import { Balances, ConnectBitcoin } from "@/index"; |
| 4 | +import { |
| 5 | + Balances, |
| 6 | + ConnectBitcoin, |
| 7 | + Profile, |
| 8 | + StakingRewards, |
| 9 | + Swap, |
| 10 | +} from "@/index"; |
| 11 | +import { ThemeToggle } from "@/components/ThemeToggle"; |
| 12 | +import { useAccount } from "wagmi"; |
5 | 13 |
|
6 | 14 | const Page = () => { |
| 15 | + const { address } = useAccount(); |
| 16 | + |
7 | 17 | return ( |
8 | | - <div className="m-4"> |
9 | | - <div className="flex justify-end gap-2 mb-10"> |
10 | | - <ConnectBitcoin /> |
11 | | - <ConnectButton label="Connect EVM" showBalance={false} /> |
12 | | - </div> |
13 | | - <div className="flex justify-center"> |
14 | | - <div className="w-[400px]"> |
15 | | - <Balances /> |
| 18 | + <div className="min-h-screen p-6"> |
| 19 | + <div className="max-w-7xl mx-auto"> |
| 20 | + <div className="flex justify-between items-center mb-8"> |
| 21 | + <h1 className="text-3xl font-bold text-gray-900 dark:text-white"> |
| 22 | + UniversalKit Components |
| 23 | + </h1> |
| 24 | + <div className="flex items-center gap-3"> |
| 25 | + <ThemeToggle /> |
| 26 | + <ConnectBitcoin /> |
| 27 | + <ConnectButton label="Connect EVM" showBalance={false} /> |
| 28 | + </div> |
| 29 | + </div> |
| 30 | + |
| 31 | + <div className="grid grid-cols-1 lg:grid-cols-2 gap-4"> |
| 32 | + <div> |
| 33 | + <h2 className="text-xl font-semibold text-gray-900 dark:text-white mb-2"> |
| 34 | + Balances |
| 35 | + </h2> |
| 36 | + <div> |
| 37 | + <Balances /> |
| 38 | + </div> |
| 39 | + </div> |
| 40 | + |
| 41 | + <div> |
| 42 | + <h2 className="text-xl font-semibold text-gray-900 dark:text-white mb-2"> |
| 43 | + Swap |
| 44 | + </h2> |
| 45 | + <div> |
| 46 | + {address ? ( |
| 47 | + <Swap contract="0x0000000000000000000000000000000000000000" /> |
| 48 | + ) : ( |
| 49 | + <div className="text-center text-gray-500 dark:text-gray-400 py-8"> |
| 50 | + Connect wallet to use Swap |
| 51 | + </div> |
| 52 | + )} |
| 53 | + </div> |
| 54 | + </div> |
| 55 | + |
| 56 | + <div> |
| 57 | + <h2 className="text-xl font-semibold text-gray-900 dark:text-white mb-2"> |
| 58 | + Profile |
| 59 | + </h2> |
| 60 | + <div> |
| 61 | + {address ? ( |
| 62 | + <Profile address={address} /> |
| 63 | + ) : ( |
| 64 | + <div className="text-center text-gray-500 dark:text-gray-400 py-8"> |
| 65 | + Connect wallet to view Profile |
| 66 | + </div> |
| 67 | + )} |
| 68 | + </div> |
| 69 | + </div> |
| 70 | + |
| 71 | + <div> |
| 72 | + <h2 className="text-xl font-semibold text-gray-900 dark:text-white mb-2"> |
| 73 | + Staking Rewards |
| 74 | + </h2> |
| 75 | + <div> |
| 76 | + <StakingRewards /> |
| 77 | + </div> |
| 78 | + </div> |
16 | 79 | </div> |
17 | 80 | </div> |
18 | 81 | </div> |
|
0 commit comments