File tree Expand file tree Collapse file tree
wp-nextjs-app/src/app/(single)/[...path]
wp-polylang-nextjs-app/src/app/[lang]/(single)/[...path]
wp-nextjs-universal-blocks/src/app/(single)/[...path] Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,12 +12,16 @@ const ClientRelatedPosts = dynamic(() =>
1212 import ( '../../../components/RelatedPosts' ) . then ( ( mod ) => mod . RelatedPosts ) ,
1313) ;
1414
15- export async function generateStaticParams ( { params } : HeadstartWPRoute ) {
16- // loads the right config based on route params (this is needed over getHeadstartWP for sites using polylang integration or multisite)
15+ export async function generateStaticParams ( {
16+ params,
17+ } : {
18+ params : Awaited < HeadstartWPRoute [ 'params' ] > ;
19+ } ) {
20+ // @ts -expect-error - params is a promise
1721 const { sourceUrl = '' , hostUrl = '/' } = await loadHeadstartWPConfig ( params ) ;
1822
1923 const { data } = await queryPosts ( {
20- routeParams : await params ,
24+ routeParams : params ,
2125 params : { postType : 'post' } ,
2226 } ) ;
2327
Original file line number Diff line number Diff line change 11/// <reference types="next" />
22/// <reference types="next/image-types/global" />
3+ /// <reference path="./.next/types/routes.d.ts" />
34
45// NOTE: This file should not be edited
56// see https://nextjs.org/docs/pages/api-reference/config/typescript for more information.
Original file line number Diff line number Diff line change @@ -8,13 +8,18 @@ import {
88} from '@headstartwp/next/app' ;
99import Blocks from '../../../../components/Blocks' ;
1010
11- export async function generateStaticParams ( { params } : HeadstartWPRoute ) {
11+ export async function generateStaticParams ( {
12+ params,
13+ } : {
14+ params : Awaited < HeadstartWPRoute [ 'params' ] > ;
15+ } ) {
1216 // loads the right config based on route params (this is needed over getHeadstartWPConfig() for sites using multisite)
17+ // @ts -expect-error - params is a promise
1318 const { sourceUrl = '' , hostUrl = '/' } = await loadHeadstartWPConfig ( params ) ;
1419
1520 // do not throw if there aren't any posts
1621 const { data } = await queryPosts ( {
17- routeParams : await params ,
22+ routeParams : params ,
1823 params : { postType : 'post' } ,
1924 options : {
2025 throwIfNotFound : false ,
Original file line number Diff line number Diff line change 2323 "@types/react" : " ^18" ,
2424 "@types/react-dom" : " ^18" ,
2525 "eslint" : " ^8" ,
26- "eslint-config-next" : " 14.2.3 "
26+ "eslint-config-next" : " 15.5.7 "
2727 }
2828}
Original file line number Diff line number Diff line change @@ -12,12 +12,17 @@ const ClientRelatedPosts = dynamic(() =>
1212 import ( '../../../components/RelatedPosts' ) . then ( ( mod ) => mod . RelatedPosts ) ,
1313) ;
1414
15- export async function generateStaticParams ( { params } : HeadstartWPRoute ) {
15+ export async function generateStaticParams ( {
16+ params,
17+ } : {
18+ params : Awaited < HeadstartWPRoute [ 'params' ] > ;
19+ } ) {
1620 // loads the right config based on route params (this is needed over getHeadstartWP for sites using polylang integration or multisite)
21+ // @ts -expect-error - params is a promise
1722 const { sourceUrl = '' , hostUrl = '/' } = await loadHeadstartWPConfig ( params ) ;
1823
1924 const { data } = await queryPosts ( {
20- routeParams : await params ,
25+ routeParams : params ,
2126 params : { postType : 'post' } ,
2227 } ) ;
2328
You can’t perform that action at this time.
0 commit comments