From 354d767fc5fc5ede06b0f97dc319a7e998f130dd Mon Sep 17 00:00:00 2001
From: Jake Jarvis
Date: Fri, 7 Jan 2022 09:57:32 -0500
Subject: [PATCH] move `` to _app.tsx so it's not rerendered
---
components/Layout.tsx | 21 +--
pages/_app.tsx | 9 +-
pages/birthday.tsx | 17 ++-
pages/cli.tsx | 14 +-
pages/contact.tsx | 67 +++++----
pages/hillary.tsx | 45 +++---
pages/index.tsx | 5 +-
pages/leo.tsx | 127 ++++++++--------
pages/license.tsx | 13 +-
pages/notes/[slug].tsx | 15 +-
pages/notes/index.tsx | 14 +-
pages/previously.tsx | 328 +++++++++++++++++++++--------------------
pages/privacy.tsx | 13 +-
pages/projects.tsx | 14 +-
pages/uses.tsx | 14 +-
15 files changed, 388 insertions(+), 328 deletions(-)
diff --git a/components/Layout.tsx b/components/Layout.tsx
index 106f3387..5c5b51f1 100644
--- a/components/Layout.tsx
+++ b/components/Layout.tsx
@@ -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 }) => (
<>
-
-
+
{children}
+
>
);
diff --git a/pages/_app.tsx b/pages/_app.tsx
index 28dae3cc..3947e81f 100644
--- a/pages/_app.tsx
+++ b/pages/_app.tsx
@@ -3,8 +3,7 @@ import { useRouter } from "next/router";
import { ThemeProvider } from "next-themes";
import { DefaultSeo, SocialProfileJsonLd } from "next-seo";
import * as Fathom from "fathom-client";
-import Header from "../components/page-header/Header";
-import Footer from "../components/page-footer/Footer";
+import Layout from "../components/Layout";
import * as config from "../lib/config";
import type { AppProps } from "next/app";
@@ -184,9 +183,9 @@ const App = ({ Component, pageProps }: AppProps) => {
/>
-
-
-
+
+
+
>
);
diff --git a/pages/birthday.tsx b/pages/birthday.tsx
index 3bb0e9ae..f51c7510 100644
--- a/pages/birthday.tsx
+++ b/pages/birthday.tsx
@@ -1,4 +1,4 @@
-import Layout from "../components/Layout";
+import { NextSeo } from "next-seo";
import Content from "../components/Content";
import PageTitle from "../components/page/PageTitle";
import Video from "../components/video/Video";
@@ -7,10 +7,15 @@ import { TapeIcon } from "../components/icons";
import thumbnail from "../public/static/images/birthday/thumb.png";
const Birthday = () => (
-
+ <>
+
+
@@ -38,7 +43,7 @@ const Birthday = () => (
controls={true}
/>
-
+ >
);
export default Birthday;
diff --git a/pages/cli.tsx b/pages/cli.tsx
index 1ef0bc04..4098a863 100644
--- a/pages/cli.tsx
+++ b/pages/cli.tsx
@@ -1,5 +1,5 @@
import Image from "next/image";
-import Layout from "../components/Layout";
+import { NextSeo } from "next-seo";
import Content from "../components/Content";
import PageTitle from "../components/page/PageTitle";
import { BotIcon } from "../components/icons";
@@ -7,7 +7,15 @@ import { BotIcon } from "../components/icons";
import cliImg from "../public/static/images/cli/screenshot.png";
const CLI = () => (
-
+ <>
+
+
@@ -82,7 +90,7 @@ const CLI = () => (
-
+ >
);
export default CLI;
diff --git a/pages/contact.tsx b/pages/contact.tsx
index 2ef20d6f..187ca836 100644
--- a/pages/contact.tsx
+++ b/pages/contact.tsx
@@ -1,10 +1,18 @@
-import Layout from "../components/Layout";
+import { NextSeo } from "next-seo";
import PageTitle from "../components/page/PageTitle";
import ContactForm from "../components/contact/ContactForm";
import { MailIcon, LockIcon } from "../components/icons";
+import Content from "../components/Content";
const Contact = () => (
-
+ <>
+
+
@@ -12,37 +20,38 @@ const Contact = () => (
>
}
/>
-
+
+
+
+
-
+ >
);
export default Contact;
diff --git a/pages/hillary.tsx b/pages/hillary.tsx
index 5dd97a1f..35e6c965 100644
--- a/pages/hillary.tsx
+++ b/pages/hillary.tsx
@@ -1,4 +1,4 @@
-import Layout from "../components/Layout";
+import { NextSeo } from "next-seo";
import Content from "../components/Content";
import PageTitle from "../components/page/PageTitle";
import Video from "../components/video/Video";
@@ -6,10 +6,15 @@ import Video from "../components/video/Video";
import thumbnail from "../public/static/images/hillary/thumb.png";
const Hillary = () => (
-
+ <>
+
+
-
+
+
+ >
);
export default Hillary;
diff --git a/pages/index.tsx b/pages/index.tsx
index 179caf49..6e4237a0 100644
--- a/pages/index.tsx
+++ b/pages/index.tsx
@@ -1,7 +1,6 @@
import Link from "next/link";
import isAbsoluteUrl from "is-absolute-url";
import { colord } from "colord";
-import Layout from "../components/Layout";
import { WaveIcon, LockIcon } from "../components/icons";
type ColorLinkProps = {
@@ -40,7 +39,7 @@ const ColorLink = ({ href, title, lightColor, darkColor, external = false, child
};
const Index = () => (
-
+ <>
Hi there! I'm Jake.{" "}
@@ -376,7 +375,7 @@ const Index = () => (
}
}
`}
-
+ >
);
export default Index;
diff --git a/pages/leo.tsx b/pages/leo.tsx
index bfc38a9d..b30ddab8 100644
--- a/pages/leo.tsx
+++ b/pages/leo.tsx
@@ -1,4 +1,4 @@
-import Layout from "../components/Layout";
+import { NextSeo } from "next-seo";
import Content from "../components/Content";
import PageTitle from "../components/page/PageTitle";
import Video from "../components/video/Video";
@@ -7,69 +7,74 @@ import thumbnail from "../public/static/images/leo/thumb.png";
const Leo = () => (
<>
-
-
-
-
-
- Video is property of{" "}
-
- G4techTV Canada
- {" "}
- &{" "}
-
- Leo Laporte
-
- . © 2007 G4 Media, Inc.
-
-
-
-
+
+
+
+
+
+ Video is property of{" "}
+
+ G4techTV Canada
+ {" "}
+ &{" "}
+
+ Leo Laporte
+
+ . © 2007 G4 Media, Inc.
+
+
+
+
>
);
diff --git a/pages/license.tsx b/pages/license.tsx
index bbfd6f17..9dc63d22 100644
--- a/pages/license.tsx
+++ b/pages/license.tsx
@@ -1,10 +1,17 @@
-import Layout from "../components/Layout";
+import { NextSeo } from "next-seo";
import Content from "../components/Content";
import PageTitle from "../components/page/PageTitle";
import { LicenseIcon } from "../components/icons";
const License = () => (
-
+ <>
+
+
@@ -459,7 +466,7 @@ const License = () => (
-
+ >
);
export default License;
diff --git a/pages/notes/[slug].tsx b/pages/notes/[slug].tsx
index 1fa20339..2fe5d604 100644
--- a/pages/notes/[slug].tsx
+++ b/pages/notes/[slug].tsx
@@ -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`}
/>
-
-
-
-
-
-
-
-
+
+
+
+
+
+
>
);
diff --git a/pages/notes/index.tsx b/pages/notes/index.tsx
index dfc60a0f..0315d741 100644
--- a/pages/notes/index.tsx
+++ b/pages/notes/index.tsx
@@ -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 }) => (
-
+ <>
+
+
-
+ >
);
export const getStaticProps: GetStaticProps = async () => {
diff --git a/pages/previously.tsx b/pages/previously.tsx
index 74ae3531..dd5f8ccb 100644
--- a/pages/previously.tsx
+++ b/pages/previously.tsx
@@ -1,7 +1,7 @@
/* eslint-disable camelcase */
import Image from "next/image";
-import Layout from "../components/Layout";
+import { NextSeo } from "next-seo";
import Content from "../components/Content";
import PageTitle from "../components/page/PageTitle";
import { FloppyIcon, SirenIcon } from "../components/icons";
@@ -22,182 +22,186 @@ import img_2018_04 from "../public/static/images/previously/2018_04.png";
const Previously = () => (
<>
-
-
- Previously on...
- >
- }
- />
-
-
+ openGraph={{
+ title: "Previously on...",
+ }}
+ />
+
+
+ Previously on...
+ >
+ }
+ />
+
+
+
+
+
+
+ ...the{" "}
-
+ Cringey Chronicles™
+ {" "}
+ of this website's past.
+
+
+
+
+
+
+ Trigger warning: marquees, Comic Sans MS, popups,{" "}
+
+ color: limegreen
+
+ ...{" "}
+
+ Click for the{" "}
+
+ FULL
+ {" "}
+ experience anyway.
+
+
+
+
+
+ November 2001 (
+
+ archived source
-
- ...the{" "}
-
- Cringey Chronicles™
- {" "}
- of this website's past.
-
-
+ )
+
+
-
+
-
- Trigger warning: marquees, Comic Sans MS, popups,{" "}
-
- color: limegreen
-
- ...{" "}
-
- Click for the{" "}
-
- FULL
- {" "}
- experience anyway.
+
+
+ February 2002
+
+
+
+
+
+
+ October 2002
+
+
+
+
+
+
+ August 2003
+
+
+
+
+
+
+ November 2004
+
+
+
+
+
+
+ April 2006
+
+
+
+
+
+
+ May 2006
+
+
+
+
+
+
+ January 2007
+
+
+
+
+
+
+ April 2007
+
+
+
+
+
+
+ May 2007
+
+
+
+
+
+
+ July 2009
+
+
+
+
+
+
+
+
+
+ September 2012 (
+
+ archived source
-
-
-
-
- November 2001 (
-
- archived source
-
- )
-
-
+ )
+
+
-
+
-
-
- February 2002
-
-
-
-
-
-
- October 2002
-
-
-
-
-
-
- August 2003
-
-
-
-
-
-
- November 2004
-
-
-
-
-
-
- April 2006
-
-
-
-
-
-
- May 2006
-
-
-
-
-
-
- January 2007
-
-
-
-
-
-
- April 2007
-
-
-
-
-
-
- May 2007
-
-
-
-
-
-
- July 2009
-
-
-
-
-
-
-
+
+
+
+
+
+ April 2018 (
+
+ archived source
-
- September 2012 (
-
- archived source
-
- )
-
-
+ )
+
+
+
-
-
-
-
-
-
-
- April 2018 (
-
- archived source
-
- )
-
-
-
-
-
+ >
);
export const getStaticProps: GetStaticProps = async () => {
diff --git a/pages/uses.tsx b/pages/uses.tsx
index 99f01cd4..b22f5fda 100644
--- a/pages/uses.tsx
+++ b/pages/uses.tsx
@@ -1,6 +1,6 @@
import Image from "next/image";
import Link from "next/link";
-import Layout from "../components/Layout";
+import { NextSeo } from "next-seo";
import Content from "../components/Content";
import PageTitle from "../components/page/PageTitle";
import { LaptopIcon } from "../components/icons";
@@ -8,7 +8,15 @@ import { LaptopIcon } from "../components/icons";
import desktopImg from "../public/static/images/uses/bigsur.png";
const Uses = () => (
-
+ <>
+
+
@@ -1070,7 +1078,7 @@ const Uses = () => (
-
+ >
);
export default Uses;