Skip to content

Commit

Permalink
Add population parameters for new BannerLink to preview (#377)
Browse files Browse the repository at this point in the history
Co-authored-by: Simone Salsi <[email protected]>
  • Loading branch information
simosalsi and Simone Salsi authored Jul 23, 2024
1 parent 2f6f6d0 commit 6581621
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/twenty-shrimps-prove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"nextjs-website": patch
---

Add population parameters for BannerLink to preview
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ describe('fetchPageFromID', () => {
});

expect(fetchMock).toHaveBeenCalledWith(
`${config.DEMO_STRAPI_API_BASE_URL}/api/pages/${pageIDExample}?publicationState=preview&populate[sections][populate][0]=ctaButtons&populate[sections][populate][1]=image&populate[sections][populate][2]=background&populate[sections][populate][3]=items.links&populate[sections][populate][4]=link&populate[sections][populate][5]=steps&populate[sections][populate][6]=accordionItems&populate[sections][populate][7]=decoration&populate[sections][populate][8]=storeButtons`,
`${config.DEMO_STRAPI_API_BASE_URL}/api/pages/${pageIDExample}?publicationState=preview&populate[sections][populate][0]=ctaButtons&populate[sections][populate][1]=image&populate[sections][populate][2]=background&populate[sections][populate][3]=items.links&populate[sections][populate][4]=link&populate[sections][populate][5]=steps&populate[sections][populate][6]=accordionItems&populate[sections][populate][7]=decoration&populate[sections][populate][8]=storeButtons&populate[sections][populate][9]=sections.decoration&populate[sections][populate][10]=sections.ctaButtons`,
{
method: 'GET',
headers: {
Expand Down
2 changes: 1 addition & 1 deletion apps/nextjs-website/src/lib/fetch/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const fetchPageFromID = ({
fetchFun(
`${
extractTenantStrapiApiData(config).baseUrl
}/api/pages/${pageID}?publicationState=preview&populate[sections][populate][0]=ctaButtons&populate[sections][populate][1]=image&populate[sections][populate][2]=background&populate[sections][populate][3]=items.links&populate[sections][populate][4]=link&populate[sections][populate][5]=steps&populate[sections][populate][6]=accordionItems&populate[sections][populate][7]=decoration&populate[sections][populate][8]=storeButtons`,
}/api/pages/${pageID}?publicationState=preview&populate[sections][populate][0]=ctaButtons&populate[sections][populate][1]=image&populate[sections][populate][2]=background&populate[sections][populate][3]=items.links&populate[sections][populate][4]=link&populate[sections][populate][5]=steps&populate[sections][populate][6]=accordionItems&populate[sections][populate][7]=decoration&populate[sections][populate][8]=storeButtons&populate[sections][populate][9]=sections.decoration&populate[sections][populate][10]=sections.ctaButtons`,
{
method: 'GET',
headers: {
Expand Down

0 comments on commit 6581621

Please sign in to comment.