From edd68ead0b4162b031b7f3deedb3ccdd382860a4 Mon Sep 17 00:00:00 2001 From: "Paul W." Date: Sat, 31 May 2025 22:21:52 -0400 Subject: [PATCH] remove turbopack option and fix type issues --- package.json | 4 ++-- src/app/notes/[note]/page.tsx | 6 +++--- src/app/posts/[post]/page.tsx | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 0acbfe5..3673ec8 100644 --- a/package.json +++ b/package.json @@ -2,8 +2,8 @@ "private": true, "scripts": { "prebuild": "node ./scripts/generate-metadata.js", - "dev": "next dev --turbopack", - "build": "next build --turbopack", + "dev": "next dev", + "build": "next build", "start": "next start", "lint": "next lint" }, diff --git a/src/app/notes/[note]/page.tsx b/src/app/notes/[note]/page.tsx index 3349ba1..7a79e7b 100644 --- a/src/app/notes/[note]/page.tsx +++ b/src/app/notes/[note]/page.tsx @@ -46,8 +46,8 @@ function Markdown({ content }: any) { } -export default async function Note({params}: {params: { note: string}}) { - const note = params.note +export default async function Note({params}: {params: Promise<{note: string}>}) { + const note = (await params).note const n = await getNotes(note) return (<> @@ -63,4 +63,4 @@ export default async function Note({params}: {params: { note: string}}) { async function getNotes(name: string) { const notesInfo: Notes = NotesInfo; return {...notesInfo[name], content: await readMarkdown('notes', name, true)} -} \ No newline at end of file +} diff --git a/src/app/posts/[post]/page.tsx b/src/app/posts/[post]/page.tsx index 726c7c8..35fddb3 100644 --- a/src/app/posts/[post]/page.tsx +++ b/src/app/posts/[post]/page.tsx @@ -45,7 +45,7 @@ function TimeBlock({ mtime, otime }: { mtime: string, otime: string }) { ); } // post: IPost & { content: string, cover?: string, otime: string, mtime?: string } -export default async function Post({ params }: { params: {post: string} }) { +export default async function Post({ params }: {params: Promise<{post: string}>}) { const post = await getPost((await params).post); if (!post) return <>; @@ -79,7 +79,7 @@ export default async function Post({ params }: { params: {post: string} }) { ); } -export async function getPost(n: string) { +async function getPost(n: string) { const postsInfo: Record = PostsInfo; return {...postsInfo[n], content: await readMarkdown('posts', n, true)}; -} \ No newline at end of file +}