From b70e71b33c0e9f8836b05b1d613cd1335e8d3fcf Mon Sep 17 00:00:00 2001 From: Tom Forbes Date: Thu, 17 Oct 2024 15:03:02 +0100 Subject: [PATCH] Configure US EOY copy --- .../campaigns/{campaigns.ts => campaigns.tsx} | 16 ++++++++++++++++ .../components/oneOffCard.tsx | 4 +++- .../twoStepPages/threeTierLanding.tsx | 11 ++++++++--- 3 files changed, 27 insertions(+), 4 deletions(-) rename support-frontend/assets/helpers/campaigns/{campaigns.ts => campaigns.tsx} (85%) diff --git a/support-frontend/assets/helpers/campaigns/campaigns.ts b/support-frontend/assets/helpers/campaigns/campaigns.tsx similarity index 85% rename from support-frontend/assets/helpers/campaigns/campaigns.ts rename to support-frontend/assets/helpers/campaigns/campaigns.tsx index dbf6094e3f..27e5bfce10 100644 --- a/support-frontend/assets/helpers/campaigns/campaigns.ts +++ b/support-frontend/assets/helpers/campaigns/campaigns.tsx @@ -13,10 +13,16 @@ export type CountdownSetting = { //}; }; +interface CampaignCopy { + subheading?: JSX.Element; + oneTimeHeading?: JSX.Element; +} + export type CampaignSettings = { isEligible: (countryGroupId: CountryGroupId) => boolean; enableSingleContributions: boolean; countdownSettings?: CountdownSetting[]; + copy: CampaignCopy; }; const campaigns: Record = { @@ -46,6 +52,16 @@ const campaigns: Record = { // countdownDeadlineInMillis: Date.parse('Sep 06, 2024 00:00:00'), // }, ], + copy: { + subheading: ( + <> + We're not owned by a billionaire or shareholders - our readers support + us. Can you help us reach our goal? Regular giving is most valuable to + us. You can cancel anytime. + + ), + oneTimeHeading: <>Choose your gift amount, + }, }, }; diff --git a/support-frontend/assets/pages/supporter-plus-landing/components/oneOffCard.tsx b/support-frontend/assets/pages/supporter-plus-landing/components/oneOffCard.tsx index cc0bb35501..23441879f3 100644 --- a/support-frontend/assets/pages/supporter-plus-landing/components/oneOffCard.tsx +++ b/support-frontend/assets/pages/supporter-plus-landing/components/oneOffCard.tsx @@ -65,6 +65,7 @@ interface Props { currencyGlyph: string; countryGroupId: CountryGroupId; currencyId: IsoCurrency; + heading: JSX.Element | undefined; } export function OneOffCard({ @@ -72,6 +73,7 @@ export function OneOffCard({ countryGroupId, amounts, currencyId, + heading, }: Props) { const oneOffAmounts = amounts.amountsCardData.ONE_OFF; const [selectedAmount, setSelectedAmount] = useState( @@ -87,7 +89,7 @@ export function OneOffCard({ ${textSans15} `} > -

Support just once

+

{heading ?? 'Support just once'}

We welcome support of any size, any time, whether you choose to give{' '} {currencyGlyph}1 or much more. diff --git a/support-frontend/assets/pages/supporter-plus-landing/twoStepPages/threeTierLanding.tsx b/support-frontend/assets/pages/supporter-plus-landing/twoStepPages/threeTierLanding.tsx index 3a1851e6dc..6331bbf139 100644 --- a/support-frontend/assets/pages/supporter-plus-landing/twoStepPages/threeTierLanding.tsx +++ b/support-frontend/assets/pages/supporter-plus-landing/twoStepPages/threeTierLanding.tsx @@ -523,9 +523,13 @@ export function ThreeTierLanding({ independent journalism

- We're not owned by a billionaire or shareholders - our readers - support us. Choose to join with one of the options below.{' '} - Cancel anytime. + {campaignSettings?.copy.subheading ?? ( + <> + We're not owned by a billionaire or shareholders - our readers + support us. Choose to join with one of the options below.{' '} + Cancel anytime. + + )}

)} {contributionType !== 'ONE_OFF' && (