move <Layout> to _app.tsx so it's not rerendered

This commit is contained in:
2022-01-07 09:57:32 -05:00
parent 34d2304e7c
commit 354d767fc5
15 changed files with 388 additions and 328 deletions
+5 -16
View File
@@ -1,26 +1,15 @@
import { NextSeo } from "next-seo";
import Header from "./page-header/Header";
import Footer from "./page-footer/Footer";
import styles from "./Layout.module.scss";
type Props = {
title?: string;
description?: string;
children: unknown;
};
const Layout = ({ title, description, children }: Props) => (
const Layout = ({ children }) => (
<>
<NextSeo
title={title}
description={description}
openGraph={{
title: title,
}}
/>
<Header />
<main className={styles.main}>
<div className={styles.container}>{children}</div>
</main>
<Footer />
</>
);