diff --git a/packages/frontend/.gitignore b/example/.gitignore similarity index 60% rename from packages/frontend/.gitignore rename to example/.gitignore index a680367..2b3533c 100644 --- a/packages/frontend/.gitignore +++ b/example/.gitignore @@ -1 +1,2 @@ .next +out diff --git a/example/pages/_app.tsx b/example/pages/_app.tsx index 0d80a1e..43baa7d 100644 --- a/example/pages/_app.tsx +++ b/example/pages/_app.tsx @@ -4,7 +4,6 @@ import { AppProps } from "next/app"; import React, { useEffect } from "react"; import { hooks as metaMaskHooks, metaMask } from "../connectors/metaMask"; -import ModalConnectProvider from "../providers/ModalConnectProvider"; const connectors: [MetaMask, Web3ReactHooks][] = [[metaMask, metaMaskHooks]]; @@ -32,9 +31,7 @@ export default function App({ Component, pageProps }: AppProps) { }, []); return ( - - - + ); } diff --git a/example/pages/index.tsx b/example/pages/index.tsx index 54e08d2..a13ccbb 100644 --- a/example/pages/index.tsx +++ b/example/pages/index.tsx @@ -33,6 +33,14 @@ export default function Home() { const [activeTab, setActiveTab] = useState(TabOptions.ENCRYPT); return ( <> + + MetaMask Encrypt/Decrypt + + + + + + {account ? (

Connected with account: {account}

diff --git a/example/providers/ModalConnectProvider.tsx b/example/providers/ModalConnectProvider.tsx deleted file mode 100644 index 6564d4d..0000000 --- a/example/providers/ModalConnectProvider.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import { useState } from "react"; -import React from "react"; -import { createContext } from "react"; - -interface IModalConnect { - showModalConnect: boolean; - setShowModalConnect: React.Dispatch>; -} - -const initialState: { - showModalConnect: boolean; - setShowModalConnect: React.Dispatch>; -} = { - showModalConnect: false, - setShowModalConnect: () => {}, -}; - -export const ModalConnectContext = createContext(initialState); - -const ModalConnectProvider = ({ children }: { children: React.ReactNode }) => { - const [showModalConnect, setShowModalConnect] = useState(false); - - return ( - - {children} - - ); -}; -export default ModalConnectProvider;