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,
"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"
},

View File

@ -46,8 +46,8 @@ function Markdown({ content }: any) {
</ReactMarkdown>
}
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 (<>
<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 }
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<string, (IPost & { cover?: string, otime: string, mtime?: string })> = PostsInfo;
return {...postsInfo[n], content: await readMarkdown('posts', n, true)};
}