From 51139c0e7f9fd23461c9b9ffcf06789f15893e85 Mon Sep 17 00:00:00 2001 From: Jessica Wade Date: Mon, 23 Sep 2024 20:37:02 -0500 Subject: [PATCH 1/2] =?UTF-8?q?Fix=20=E2=80=98Sponsored=E2=80=99=20article?= =?UTF-8?q?=20error?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit img wasn’t defined --- .../components/blocks/content/list-item.marko | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/packages/common/components/blocks/content/list-item.marko b/packages/common/components/blocks/content/list-item.marko index 54976d9..1fd105d 100644 --- a/packages/common/components/blocks/content/list-item.marko +++ b/packages/common/components/blocks/content/list-item.marko @@ -78,14 +78,16 @@ $ const ctaLinkAttrs = { style: ctaLinkStyles, ...linkAttrs }; ${tag} - - <@link href=advertiser.website target="_blank" attrs=imgLinkAttrs /> - + + + <@link href=url target="_blank" attrs=imgLinkAttrs /> + + @@ -96,7 +98,9 @@ $ const ctaLinkAttrs = { style: ctaLinkStyles, ...linkAttrs }; + + From b1253c883c1bfee05724923940a5e223781f88f3 Mon Sep 17 00:00:00 2001 From: Jessica Wade Date: Tue, 24 Sep 2024 08:15:02 -0500 Subject: [PATCH 2/2] =?UTF-8?q?Set=20a=20fallback=20value=20of=20company?= =?UTF-8?q?=20if=20Mindful=20advertiser=20isn=E2=80=99t=20found?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/common/components/blocks/content/list-item.marko | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/common/components/blocks/content/list-item.marko b/packages/common/components/blocks/content/list-item.marko index 1fd105d..497ce8b 100644 --- a/packages/common/components/blocks/content/list-item.marko +++ b/packages/common/components/blocks/content/list-item.marko @@ -3,6 +3,7 @@ import defaultValue from "@parameter1/base-cms-marko-core/utils/default-value"; import buildLinkUrl from '@science-medicine-group/package-common/utils/build-link-url'; $ const { content, ctaLinkStyle, advertiser } = input; +$ const company = (advertiser) ? advertiser : content.company; $ const creativeId = get(input, "mindfulCreativeId"); $ const tenant = get(input, "mindfulTenant"); $ const url = buildLinkUrl(content.siteContext.url); @@ -78,7 +79,7 @@ $ const ctaLinkAttrs = { style: ctaLinkStyles, ...linkAttrs };