Skip to content

Commit

Permalink
feat: add wallets providers & basic layout (#7)
Browse files Browse the repository at this point in the history
* wallets providers + layout

* fixing PR to limit it to the scope of the PR
  • Loading branch information
aspnxdd authored May 4, 2022
1 parent ff0df07 commit 0a4d520
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 116 deletions.
110 changes: 0 additions & 110 deletions components/CreateCM/Form.tsx

This file was deleted.

32 changes: 26 additions & 6 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,45 @@ import {
WalletProvider,
} from "@solana/wallet-adapter-react";
import { WalletAdapterNetwork } from "@solana/wallet-adapter-base";
import { PhantomWalletAdapter } from "@solana/wallet-adapter-wallets";
import {
GlowWalletAdapter,
PhantomWalletAdapter,
SlopeWalletAdapter,
SolflareWalletAdapter,
SolletExtensionWalletAdapter,
SolletWalletAdapter,
TorusWalletAdapter,
} from '@solana/wallet-adapter-wallets';
import { WalletModalProvider } from "@solana/wallet-adapter-react-ui";
import {Wallet,Navbar} from "components/Layout";
import { clusterApiUrl } from "@solana/web3.js";

// Default styles that can be overridden by your app
require("@solana/wallet-adapter-react-ui/styles.css");


function MyApp({ Component, pageProps }: AppProps) {
const network = WalletAdapterNetwork.Devnet;

const endpoint = useMemo(() => clusterApiUrl(network), [network]);

const wallets = useMemo(() => [new PhantomWalletAdapter()], [network]);
const wallets = useMemo(
() => [
new PhantomWalletAdapter(),
new GlowWalletAdapter(),
new SlopeWalletAdapter(),
new SolflareWalletAdapter({ network }),
new TorusWalletAdapter(),
new SolletWalletAdapter({ network }),
new SolletExtensionWalletAdapter({ network }),
],
[network]
);

return (
<ConnectionProvider endpoint={endpoint}>
<WalletProvider wallets={wallets} autoConnect>
<ConnectionProvider endpoint={endpoint} >
<WalletProvider wallets={wallets} >
<Navbar />
<WalletModalProvider>
<WalletModalProvider >
<Wallet />
<div style={{ marginLeft: "10rem" }}>
<Component {...pageProps} />
Expand Down

0 comments on commit 0a4d520

Please sign in to comment.