feat: providers working

Still need to flesh out real demo components and handle the case where there isn't a solana provider injected
This commit is contained in:
Quazia
2025-05-22 14:24:47 -04:00
parent 9f748076db
commit 7f10d4e8c0
3 changed files with 29 additions and 1 deletions

View File

@@ -0,0 +1,16 @@
import * as React from "react";
import { useWallet } from "@solana/wallet-adapter-react";
export function SolanaWalletDemo() {
const { publicKey } = useWallet();
const solanaAddress = publicKey?.toBase58() ?? "";
return (
<div style={{ padding: 16, background: "#f6f6f6", borderRadius: 8, margin: 16 }}>
<h3>Solana Wallet Demo</h3>
<div>
<strong>Solana Address:</strong>
<span style={{ marginLeft: 8 }}>{solanaAddress || "Not connected"}</span>
</div>
</div>
);
}