mirror of
https://github.com/OwethuManagedServices/oms-website-nextjs.git
synced 2025-12-19 02:48:09 +00:00
fixed deployment issue
This commit is contained in:
@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user