From 0a4d5204f450c9b786c00852ff21f320c53c5b95 Mon Sep 17 00:00:00 2001
From: Arnau Espin <43625217+aspnxdd@users.noreply.github.com>
Date: Wed, 4 May 2022 15:07:43 +0200
Subject: [PATCH] feat: add wallets providers & basic layout (#7)
* wallets providers + layout
* fixing PR to limit it to the scope of the PR
---
components/CreateCM/Form.tsx | 110 -----------------------------------
pages/_app.tsx | 32 ++++++++--
2 files changed, 26 insertions(+), 116 deletions(-)
delete mode 100644 components/CreateCM/Form.tsx
diff --git a/components/CreateCM/Form.tsx b/components/CreateCM/Form.tsx
deleted file mode 100644
index f768a05..0000000
--- a/components/CreateCM/Form.tsx
+++ /dev/null
@@ -1,110 +0,0 @@
-import { FC, useState, useEffect } from "react";
-import { useWallet } from "@solana/wallet-adapter-react";
-
-const Form: FC = () => {
- const { publicKey } = useWallet();
-
- const [dateTime, setDateTime] = useState("");
- const [time, setTime] = useState("");
-
- function UTCify(dateTime: string, time: string): string {
- // TODO
- return "";
- }
-
- useEffect(() => {
- console.log(UTCify(dateTime, time));
- }, [dateTime, time]);
-
- return (
-
- );
-};
-
-interface Props {
- id: string;
- text: string;
- type: string;
- defaultValue?: string;
- value?: string;
- setValue?: (value: string) => void;
-}
-
-const FormInput: FC = ({
- id,
- text,
- type,
- defaultValue,
- value,
- setValue,
-}) => {
- return (
- <>
-
- {
- if (setValue) setValue(e.target.value);
- }}
- />
- >
- );
-};
-
-export default Form;
-
-/**
-"price": 0.01,
-"number": 4,
-"gatekeeper": {
- "gatekeeperNetwork": "ignREusXmGrscGNUesoU9mxfds9AiYTezUKex2PsZV6",
- "expireOnUse": true
-},
-"solTreasuryAccount": "BoX451MZzydoVdZE4NFfmMT3J5Ztqo7YgUNbwwMfjPFu",
-"splTokenAccount": null,
-"splToken": null,
-"goLiveDate": "3 May 2021 08:00:00 GMT",
-"endSettings": null,
-"whitelistMintSettings": null,
-"hiddenSettings": null,
-"storage": "arweave",
-"ipfsInfuraProjectId": null,
-"ipfsInfuraSecret": null,
-"nftStorageKey": null,
-"awsS3Bucket": null,
-"noRetainAuthority": false,
-"noMutable": false
-**/
diff --git a/pages/_app.tsx b/pages/_app.tsx
index 9774f6f..2fc0a9f 100644
--- a/pages/_app.tsx
+++ b/pages/_app.tsx
@@ -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 (
-
-
+
+
-
+