fixed deployment issue

This commit is contained in:
libertyoms
2025-04-30 10:34:16 +02:00
parent 179f1c9a2c
commit e198158c6d
3 changed files with 16 additions and 14 deletions

View File

@ -14,10 +14,6 @@ import {
CodeData,
} from "@/types";
type Props = {
params: { slug: string };
};
export async function generateStaticParams() {
const posts = await getPosts();
if (!Array.isArray(posts)) {
@ -53,7 +49,11 @@ function extractDescriptionFromBlocks(
return null;
}
export async function generateMetadata({ params }: Props): Promise<Metadata> {
export async function generateMetadata({
params,
}: {
params: Promise<{ slug: string }>;
}): Promise<Metadata> {
const { slug } = await params;
const post = await getPostBySlug(slug, {
fields: [
@ -228,7 +228,11 @@ const renderBlock = (block: ContentBlock) => {
}
};
export default async function PostPage({ params }: Props) {
export default async function PostPage({
params,
}: {
params: Promise<{ slug: string }>;
}) {
const { slug } = await params;
const post = await getPostBySlug(slug);