Skip to content

Commit 0b2cf72

Browse files
committed
fix type issue in docs site
1 parent ea9981f commit 0b2cf72

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

website/app/docs/[[...slug]]/page.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { DocsBody, DocsPage } from 'fumadocs-ui/page';
44
import type { Metadata } from 'next';
55
import { notFound } from 'next/navigation';
66

7-
export default async function Page({ params }: { params: { slug?: string[] } }) {
7+
export default async function Page({ params }: { params: Promise<{ slug?: string[] }> }) {
88
const page = source.getPage((await params).slug);
99

1010
if (page == null) {
@@ -29,7 +29,9 @@ export async function generateStaticParams() {
2929
}));
3030
}
3131

32-
export async function generateMetadata({ params }: { params: { slug?: string[] } }): Metadata {
32+
export async function generateMetadata({
33+
params,
34+
}: { params: Promise<{ slug?: string[] }> }): Promise<Metadata> {
3335
const page = source.getPage((await params).slug);
3436

3537
if (page == null) {

website/app/page.tsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ import { DocsBody, DocsPage } from 'fumadocs-ui/page';
44
import type { Metadata } from 'next';
55
import { notFound } from 'next/navigation';
66

7-
// biome-ignore lint/suspicious/useAwait: <explanation>
8-
export default async function HomePage(props: { params: { slug?: string[] } }) {
9-
const page = source.getPage(props.params.slug);
7+
export default async function HomePage(props: { params: Promise<{ slug?: string[] }> }) {
8+
const page = source.getPage((await props.params).slug);
109
if (!page) {
1110
notFound();
1211
}

0 commit comments

Comments
 (0)