From 2dbef21f344b93eb3aa62213432cd91fb8dbe2a5 Mon Sep 17 00:00:00 2001 From: daniecon Date: Sun, 18 Sep 2022 17:16:30 +0200 Subject: [PATCH] Added Layout --- dapp/components/Layout.tsx | 16 ++++++++++++++++ dapp/components/index.ts | 1 + dapp/pages/_app.tsx | 5 ++++- dapp/pages/index.tsx | 13 ++----------- 4 files changed, 23 insertions(+), 12 deletions(-) create mode 100644 dapp/components/Layout.tsx diff --git a/dapp/components/Layout.tsx b/dapp/components/Layout.tsx new file mode 100644 index 0000000..695a087 --- /dev/null +++ b/dapp/components/Layout.tsx @@ -0,0 +1,16 @@ +import { Navbar } from "./" +import Head from "next/head" + +export default function Layout(props: any) { + return ( + <> + + zkAuth + + + + +
{props.children}
+ + ) +} diff --git a/dapp/components/index.ts b/dapp/components/index.ts index e3eb43b..9491114 100644 --- a/dapp/components/index.ts +++ b/dapp/components/index.ts @@ -8,3 +8,4 @@ export { default as ToggleColorMode } from "./ToggleColorMode" export { default as TotpSetup } from "./TotpSetup" export { default as ZkPasswordSetup } from "./ZkPasswordSetup" export { default as CardChoice } from "./CardChoice" +export { default as Layout } from "./Layout" diff --git a/dapp/pages/_app.tsx b/dapp/pages/_app.tsx index 10ca8ad..e4dc009 100644 --- a/dapp/pages/_app.tsx +++ b/dapp/pages/_app.tsx @@ -1,5 +1,6 @@ import "../styles/globals.css" import type { AppProps } from "next/app" +import { Layout } from "../components" import { ThemeProvider } from "next-themes" import { DAppProvider } from "@usedapp/core" @@ -11,7 +12,9 @@ function MyApp({ Component, pageProps }: AppProps) { return ( - + + + ) diff --git a/dapp/pages/index.tsx b/dapp/pages/index.tsx index 33d069c..c5cdf21 100644 --- a/dapp/pages/index.tsx +++ b/dapp/pages/index.tsx @@ -1,19 +1,10 @@ import type { NextPage } from "next" -import Head from "next/head" -import { LogInBox, Navbar } from "../components" +import { LogInBox } from "../components" const Home: NextPage = () => { return (
- - zkAuth - - - - - - -
+