diff --git a/src/pages/trees/[treeid].js b/src/pages/trees/[treeid].js index df562a00a..47ff592f2 100644 --- a/src/pages/trees/[treeid].js +++ b/src/pages/trees/[treeid].js @@ -577,9 +577,15 @@ export default function Tree({ entityType="Planting Organization" buttonText="Meet the Organization" cardImageSrc={organization?.logo_url || imagePlaceholder} - link={`/organizations/${ - organization.id - }?keyword=${nextExtraKeyword}${isEmbed ? '&embed=true' : ''}`} + link={`/organizations/${organization.id}${ + nextExtraKeyword + ? `?keyword=${nextExtraKeyword}` + : '' + }${ + isEmbed + ? `${nextExtraKeyword ? '&' : '?'}embed=true` + : '' + }`} /> )} @@ -594,8 +600,14 @@ export default function Tree({ buttonText="Meet the Planter" cardImageSrc={planter?.image_url || imagePlaceholder} rotation={planter?.image_rotation} - link={`/planters/${planter.id}?keyword=${nextExtraKeyword}${ - isEmbed ? '&embed=true' : '' + link={`/planters/${planter.id}${ + nextExtraKeyword + ? `?keyword=${nextExtraKeyword}` + : '' + }${ + isEmbed + ? `${nextExtraKeyword ? '&' : '?'}embed=true` + : '' }`} /> diff --git a/src/pages/v2/captures/[captureid].js b/src/pages/v2/captures/[captureid].js index 0c56101ad..5d3af890c 100644 --- a/src/pages/v2/captures/[captureid].js +++ b/src/pages/v2/captures/[captureid].js @@ -579,8 +579,14 @@ export default function Capture({ buttonText="Meet the Organization" cardImageSrc={logo_url || imagePlaceholder} // TODO: this wont work until organizationsV2 page is completed - link={`/stakeholder/stakeholders/${id}?keyword=${nextExtraKeyword}${ - isEmbed ? '&embed=true' : '' + link={`/stakeholder/stakeholders/${id}${ + nextExtraKeyword + ? `?keyword=${nextExtraKeyword}` + : '' + }${ + isEmbed + ? `${nextExtraKeyword ? '&' : '?'}embed=true` + : '' }`} /> @@ -597,8 +603,14 @@ export default function Capture({ cardImageSrc={grower?.image_url || imagePlaceholder} rotation={grower?.image_rotation} // TODO: this wont work until growers page is completed - link={`/grower-accounts/${grower.id}?keyword=${nextExtraKeyword}${ - isEmbed ? '&embed=true' : '' + link={`/grower-accounts/${grower.id}${ + nextExtraKeyword + ? `?keyword=${nextExtraKeyword}` + : '' + }${ + isEmbed + ? `${nextExtraKeyword ? '&' : '?'}embed=true` + : '' }`} />