Skip to content

Commit e732876

Browse files
authored
Merge pull request #13762 from guardian/tf-fix-choice-cards
Fix clashing choice cards
2 parents 400bafe + 95d02da commit e732876

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

dotcom-rendering/src/components/marketing/banners/designableBanner/DesignableBannerV2.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,7 @@ const DesignableBannerV2: ReactComponent<BannerRenderProps> = ({
452452
isTabletOrAbove,
453453
countryCode,
454454
)}
455+
id={'banner'}
455456
/>
456457

457458
<div css={styles.ctaContainer}>

dotcom-rendering/src/components/marketing/epics/ThreeTierChoiceCards.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ type ThreeTierChoiceCardsProps = {
183183
countryCode?: string;
184184
choices: ChoiceInfo[];
185185
supporterPlusDiscount?: number;
186+
id: string; // uniquely identify this choice cards component to avoid conflicting with others
186187
};
187188

188189
export const ThreeTierChoiceCards = ({
@@ -191,6 +192,7 @@ export const ThreeTierChoiceCards = ({
191192
setSelectedProduct,
192193
choices,
193194
supporterPlusDiscount,
195+
id,
194196
}: ThreeTierChoiceCardsProps) => {
195197
const currencySymbol = getLocalCurrencySymbol(countryCode);
196198
const countryGroupId = countryCodeToCountryGroupId(countryCode);
@@ -221,7 +223,7 @@ export const ThreeTierChoiceCards = ({
221223
!isUndefined(supporterPlusDiscount) &&
222224
supportTier === 'SupporterPlus';
223225

224-
const radioId = `choicecard-${supportTier}`;
226+
const radioId = `choicecard-${id}-${supportTier}`;
225227

226228
return (
227229
<div

dotcom-rendering/src/components/marketing/epics/ctas/ContributionsEpicCtasContainer.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ export const ContributionsEpicCtasContainer: ReactComponent<Props> = ({
6767
supporterPlusDiscount={
6868
hasSupporterPlusPromoCode ? 0.5 : undefined
6969
}
70+
id={'epic'}
7071
/>
7172
)}
7273
<ContributionsEpicButtons

0 commit comments

Comments
 (0)