remove turbopack option and fix type issues

This commit is contained in:
Paul W. 2025-05-31 22:21:52 -04:00
parent 1cca454a75
commit edd68ead0b
Signed by: xyz
GPG Key ID: DF12EBB915A949ED
3 changed files with 8 additions and 8 deletions

View File

@ -2,8 +2,8 @@
"private": true, "private": true,
"scripts": { "scripts": {
"prebuild": "node ./scripts/generate-metadata.js", "prebuild": "node ./scripts/generate-metadata.js",
"dev": "next dev --turbopack", "dev": "next dev",
"build": "next build --turbopack", "build": "next build",
"start": "next start", "start": "next start",
"lint": "next lint" "lint": "next lint"
}, },

View File

@ -46,8 +46,8 @@ function Markdown({ content }: any) {
</ReactMarkdown> </ReactMarkdown>
} }
export default async function Note({params}: {params: { note: string}}) { export default async function Note({params}: {params: Promise<{note: string}>}) {
const note = params.note const note = (await params).note
const n = await getNotes(note) const n = await getNotes(note)
return (<> return (<>
<span className={style['last-updated']}> <span className={style['last-updated']}>

View File

@ -45,7 +45,7 @@ function TimeBlock({ mtime, otime }: { mtime: string, otime: string }) {
); );
} }
// post: IPost & { content: string, cover?: string, otime: string, mtime?: 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); const post = await getPost((await params).post);
if (!post) if (!post)
return <></>; 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<string, (IPost & { cover?: string, otime: string, mtime?: string })> = PostsInfo; const postsInfo: Record<string, (IPost & { cover?: string, otime: string, mtime?: string })> = PostsInfo;
return {...postsInfo[n], content: await readMarkdown('posts', n, true)}; return {...postsInfo[n], content: await readMarkdown('posts', n, true)};
} }