Skip to content

Commit

Permalink
Merge pull request #6425 from guardian/tf-lp-copy
Browse files Browse the repository at this point in the history
Configure US EOY copy
  • Loading branch information
tomrf1 authored Oct 18, 2024
2 parents 129cb32 + b70e71b commit be54128
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, CampaignSettings> = {
Expand Down Expand Up @@ -46,6 +52,16 @@ const campaigns: Record<string, CampaignSettings> = {
// 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. <strong>You can cancel anytime.</strong>
</>
),
oneTimeHeading: <>Choose your gift amount</>,
},
},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,15 @@ interface Props {
currencyGlyph: string;
countryGroupId: CountryGroupId;
currencyId: IsoCurrency;
heading: JSX.Element | undefined;
}

export function OneOffCard({
currencyGlyph,
countryGroupId,
amounts,
currencyId,
heading,
}: Props) {
const oneOffAmounts = amounts.amountsCardData.ONE_OFF;
const [selectedAmount, setSelectedAmount] = useState<number | 'other'>(
Expand All @@ -87,7 +89,7 @@ export function OneOffCard({
${textSans15}
`}
>
<h2 css={titleStyle}>Support just once</h2>
<h2 css={titleStyle}>{heading ?? 'Support just once'}</h2>
<p css={standFirst}>
We welcome support of any size, any time, whether you choose to give{' '}
{currencyGlyph}1 or much more.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -523,9 +523,13 @@ export function ThreeTierLanding({
independent journalism
</h1>
<p css={standFirst}>
We're not owned by a billionaire or shareholders - our readers
support us. Choose to join with one of the options below.{' '}
<strong>Cancel anytime.</strong>
{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.{' '}
<strong>Cancel anytime.</strong>
</>
)}
</p>
<PaymentFrequencyButtons
paymentFrequencies={paymentFrequencies.map(
Expand All @@ -544,6 +548,7 @@ export function ThreeTierLanding({
currencyGlyph={currencies[currencyId].glyph}
countryGroupId={countryGroupId}
currencyId={currencyId}
heading={campaignSettings?.copy.oneTimeHeading}
/>
)}
{contributionType !== 'ONE_OFF' && (
Expand Down

0 comments on commit be54128

Please sign in to comment.