remove turbopack option and fix type issues
This commit is contained in:
parent
1cca454a75
commit
edd68ead0b
@ -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"
|
||||||
},
|
},
|
||||||
|
@ -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']}>
|
||||||
|
@ -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)};
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user