File tree 2 files changed +6
-5
lines changed
2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { DocsBody, DocsPage } from 'fumadocs-ui/page';
4
4
import type { Metadata } from 'next' ;
5
5
import { notFound } from 'next/navigation' ;
6
6
7
- export default async function Page ( { params } : { params : { slug ?: string [ ] } } ) {
7
+ export default async function Page ( { params } : { params : Promise < { slug ?: string [ ] } > } ) {
8
8
const page = source . getPage ( ( await params ) . slug ) ;
9
9
10
10
if ( page == null ) {
@@ -29,7 +29,9 @@ export async function generateStaticParams() {
29
29
} ) ) ;
30
30
}
31
31
32
- export async function generateMetadata ( { params } : { params : { slug ?: string [ ] } } ) : Metadata {
32
+ export async function generateMetadata ( {
33
+ params,
34
+ } : { params : Promise < { slug ?: string [ ] } > } ) : Promise < Metadata > {
33
35
const page = source . getPage ( ( await params ) . slug ) ;
34
36
35
37
if ( page == null ) {
Original file line number Diff line number Diff line change @@ -4,9 +4,8 @@ import { DocsBody, DocsPage } from 'fumadocs-ui/page';
4
4
import type { Metadata } from 'next' ;
5
5
import { notFound } from 'next/navigation' ;
6
6
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 ) ;
10
9
if ( ! page ) {
11
10
notFound ( ) ;
12
11
}
You can’t perform that action at this time.
0 commit comments