-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
37 lines (29 loc) · 889 Bytes
/
App.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// App.tsx
import { createWeb3Modal, defaultSolanaConfig } from "@web3modal/solana/react";
import { solana, solanaTestnet, solanaDevnet } from "@web3modal/solana/chains";
import HomePage from "@/app/(pages)/page";
// 0. Setup chains
const chains = [solana, solanaTestnet, solanaDevnet];
export const projectId = process.env.NEXT_PUBLIC_WAGMI_PROJECT_ID;
if (!projectId) throw new Error("Project ID is not defined");
// 2. Create solanaConfig
const metadata = {
name: "AppKit",
description: "AppKit Solana Example",
url: "https://web3modal.com", // origin must match your domain & subdomain
icons: ["https://avatars.githubusercontent.com/u/37784886"],
};
const solanaConfig = defaultSolanaConfig({
metadata,
chains,
projectId,
});
// 3. Create modal
createWeb3Modal({
solanaConfig,
chains,
projectId,
});
export default function App() {
return <HomePage />;
}