mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2026-07-30 11:45:21 -04:00
move <Layout> to _app.tsx so it's not rerendered
This commit is contained in:
+5
-16
@@ -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 />
|
||||
</>
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user