From 3e84d77d6a4b421bddbcb0c99b01623cad60cdba Mon Sep 17 00:00:00 2001 From: Triston Armstrong Date: Sun, 7 Jan 2024 15:39:53 -0600 Subject: [PATCH] fix head tags and add page props to body in document file --- pages/_document.tsx | 10 +++++--- pages/index.tsx | 1 - pages/notes/[id].tsx | 6 ++--- pages/notes/index.tsx | 10 +++----- pages/playground/index.tsx | 48 +++++++++++++++++++++----------------- 5 files changed, 39 insertions(+), 36 deletions(-) diff --git a/pages/_document.tsx b/pages/_document.tsx index 320ed42..9071ec7 100644 --- a/pages/_document.tsx +++ b/pages/_document.tsx @@ -1,6 +1,10 @@ -import { Html, Head, Main, NextScript } from 'next/document' +import { Html, Head, Main, NextScript, type DocumentProps } from 'next/document' + +interface DocProps extends DocumentProps { } + +export default function Document(props: DocProps) { + const pageProps = props?.__NEXT_DATA__?.props?.['pageProps'] -export default function Document() { return ( @@ -8,7 +12,7 @@ export default function Document() { - +
diff --git a/pages/index.tsx b/pages/index.tsx index 0113da1..6a09a39 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -15,7 +15,6 @@ interface LandingProps { export default function Landing({ jobs, skills, projects }: LandingProps) { return (
- peng
diff --git a/pages/notes/[id].tsx b/pages/notes/[id].tsx index 5a3c8df..2b8959a 100644 --- a/pages/notes/[id].tsx +++ b/pages/notes/[id].tsx @@ -18,12 +18,9 @@ interface HomeProps { export default function Home({ note, backLinks, fileNames: _, tree, flattenNodes }: HomeProps) { return ( - {/* {note.title && } - - */}