From f2054ae4d2b2fd785cc95898305ce809172654b2 Mon Sep 17 00:00:00 2001 From: Spencer Schoeneman <78219375+Spencer-Sch@users.noreply.github.com> Date: Tue, 14 Nov 2023 16:24:46 -0600 Subject: [PATCH] Add page layouts to frontend (#2) * add page layout with no header or footer * add page layout with header and footer * edit index.tsx page to work with new page layouts * remove Header and Footer from _app.tsx * alter _app.tsx to work with new page layouts --- .../nextjs/components/layouts/CleanLayout.tsx | 13 ++++++++++ .../components/layouts/HeaderFooterLayout.tsx | 17 +++++++++++++ packages/nextjs/pages/_app.tsx | 25 +++++++++++-------- packages/nextjs/pages/index.tsx | 14 ++++++++--- 4 files changed, 54 insertions(+), 15 deletions(-) create mode 100644 packages/nextjs/components/layouts/CleanLayout.tsx create mode 100644 packages/nextjs/components/layouts/HeaderFooterLayout.tsx diff --git a/packages/nextjs/components/layouts/CleanLayout.tsx b/packages/nextjs/components/layouts/CleanLayout.tsx new file mode 100644 index 0000000..2695706 --- /dev/null +++ b/packages/nextjs/components/layouts/CleanLayout.tsx @@ -0,0 +1,13 @@ +import React, { ReactNode } from "react"; + +interface CleanLayoutProps { + children: ReactNode; +} + +export default function CleanLayout({ children }: CleanLayoutProps) { + return ( + <> +
{children}
+ + ); +} diff --git a/packages/nextjs/components/layouts/HeaderFooterLayout.tsx b/packages/nextjs/components/layouts/HeaderFooterLayout.tsx new file mode 100644 index 0000000..d1d0d5c --- /dev/null +++ b/packages/nextjs/components/layouts/HeaderFooterLayout.tsx @@ -0,0 +1,17 @@ +import React, { ReactNode } from "react"; +import { Footer } from "~~/components/Footer"; +import { Header } from "~~/components/Header"; + +interface HeaderFooterLayoutProps { + children: ReactNode; +} + +export default function HeaderFooterLayout({ children }: HeaderFooterLayoutProps) { + return ( + <> +
+
{children}
+