mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-11-05 04:15:41 -05:00
move <Layout> to _app.tsx so it's not rerendered
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { MDXRemote } from "next-mdx-remote";
|
||||
import { serialize } from "next-mdx-remote/serialize";
|
||||
import { NextSeo, ArticleJsonLd } from "next-seo";
|
||||
import Layout from "../../components/Layout";
|
||||
import Content from "../../components/Content";
|
||||
import Meta from "../../components/notes/Meta";
|
||||
import mdxComponents from "../../components/mdxComponents";
|
||||
@@ -53,14 +52,12 @@ const Note = ({ frontMatter, source }) => (
|
||||
publisherLogo={`${config.baseUrl}/static/images/me.jpg`}
|
||||
/>
|
||||
|
||||
<Layout>
|
||||
<Meta {...frontMatter} />
|
||||
<Content>
|
||||
<div className="markdown">
|
||||
<MDXRemote {...source} components={mdxComponents} />
|
||||
</div>
|
||||
</Content>
|
||||
</Layout>
|
||||
<Meta {...frontMatter} />
|
||||
<Content>
|
||||
<div className="markdown">
|
||||
<MDXRemote {...source} components={mdxComponents} />
|
||||
</div>
|
||||
</Content>
|
||||
</>
|
||||
);
|
||||
|
||||
|
||||
@@ -1,13 +1,21 @@
|
||||
import { NextSeo } from "next-seo";
|
||||
import { format } from "date-fns";
|
||||
import Layout from "../../components/Layout";
|
||||
import List from "../../components/notes/List";
|
||||
import { getAllNotes } from "../../lib/parse-notes";
|
||||
import type { GetStaticProps } from "next";
|
||||
|
||||
const Notes = ({ notesByYear }) => (
|
||||
<Layout title="Notes" description="Recent posts by Jake Jarvis.">
|
||||
<>
|
||||
<NextSeo
|
||||
title="Notes"
|
||||
description="Recent posts by Jake Jarvis."
|
||||
openGraph={{
|
||||
title: "Notes",
|
||||
}}
|
||||
/>
|
||||
|
||||
<List notesByYear={notesByYear} />
|
||||
</Layout>
|
||||
</>
|
||||
);
|
||||
|
||||
export const getStaticProps: GetStaticProps = async () => {
|
||||
|
||||
Reference in New Issue
Block a user