mirror of
https://github.com/neynarxyz/create-farcaster-mini-app.git
synced 2025-11-18 17:09:47 -05:00
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:
16
src/components/SolanaWalletDemo.tsx
Normal file
16
src/components/SolanaWalletDemo.tsx
Normal 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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user