File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,8 @@ interface Param {
1414 slug : string [ ]
1515}
1616
17- export default function Page ( { params } : { params : Param } ) : React . ReactElement {
17+ export default async function Page ( props : { params : Promise < Param > } ) : Promise < React . ReactElement > {
18+ const params = await props . params
1819 const page = utils . getPage ( params . slug )
1920
2021 if ( ! page ) notFound ( )
@@ -119,7 +120,8 @@ export function generateStaticParams(): Param[] {
119120 } )
120121}
121122
122- export function generateMetadata ( { params } : { params : { slug ?: string [ ] } } ) {
123+ export async function generateMetadata ( props : { params : Promise < { slug ?: string [ ] } > } ) {
124+ const params = await props . params
123125 const page = utils . getPage ( params . slug )
124126
125127 if ( ! page ) notFound ( )
You can’t perform that action at this time.
0 commit comments