Skip to content

Commit

Permalink
review: duplicate code removed
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-daniel-dempsey committed Jan 21, 2025
1 parent c5c5eb1 commit 597aa1b
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions support-frontend/assets/helpers/productCatalog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,15 +152,6 @@ const feastBenefit = {
'Make a feast out of anything with the Guardian’s new recipe app. Feast has thousands of recipes including quick and budget-friendly weeknight dinners, and showstopping weekend dishes – plus smart app features to make mealtimes inspiring.',
};

const supporterPlusBenefits = [
fewerAsksBenefit,
newsletterBenefit,
addFreeBenefit,
appBenefit,
partnerOffersBenefit,
feastBenefit,
];

const supporterPlusBenefitsControl = [
appBenefitControlV2,
addFreeBenefit,
Expand All @@ -169,15 +160,14 @@ const supporterPlusBenefitsControl = [
partnerOffersBenefit,
feastBenefit,
];

const supporterPlusBenefitsV1 = [
fewerAsksBenefit,
newsletterBenefit,
addFreeBenefit,
appBenefit,
partnerOffersBenefit,
feastBenefit,
];

const supporterPlusBenefitsV2 = [
appBenefitControlV2,
addFreeBenefit,
Expand All @@ -186,7 +176,6 @@ const supporterPlusBenefitsV2 = [
feastBenefit,
];

const contributionBenefits = [newsletterBenefit];
const contributionBenefitsControl = [newsletterBenefitControl];
const contributionBenefitsV1 = [newsletterBenefit];
const contributionBenefitsAnnualV2 = [newsletterBenefitAnnualV2];
Expand Down Expand Up @@ -242,7 +231,7 @@ export const productCatalogDescription: Record<
],
benefits: [guardianWeeklyBenefit],
/** These are just the SupporterPlus benefits */
benefitsAdditional: supporterPlusBenefits,
benefitsAdditional: supporterPlusBenefitsV1,
deliverableTo: gwDeliverableCountries,
ratePlans: {
DomesticMonthly: {
Expand Down Expand Up @@ -318,7 +307,7 @@ export const productCatalogDescription: Record<
SupporterPlus: {
label: 'All-access digital',
/** These are duplicated in the TierThree benefitsAdditional */
benefits: supporterPlusBenefits,
benefits: supporterPlusBenefitsV1,
ratePlans: {
Monthly: {
billingPeriod: 'Monthly',
Expand Down Expand Up @@ -395,7 +384,7 @@ export const productCatalogDescription: Record<
},
Contribution: {
label: 'Support',
benefits: contributionBenefits,
benefits: contributionBenefitsV1,
benefitsMissing: [
appBenefit,
addFreeBenefit,
Expand Down

0 comments on commit 597aa1b

Please sign in to comment.