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