Skip to content

Commit

Permalink
remove the restriction in the cancellationReasonReview component that…
Browse files Browse the repository at this point in the history
… only allows monthly billing period supporter plus products to take up an offer
  • Loading branch information
Richard Bangay committed Nov 19, 2024
1 parent 21f145e commit cfb87ef
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions client/components/mma/cancel/CancellationReasonReview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,10 @@ import type {
import { fetchWithDefaultParameters } from '@/client/utilities/fetch';
import { cancelAlternativeUrlPartLookup } from '@/shared/cancellationUtilsAndTypes';
import { featureSwitches } from '@/shared/featureSwitches';
import type {
TrueFalsePending} from '@/shared/generalTypes';
import {
appendCorrectPluralisation
} from '@/shared/generalTypes';
import type { TrueFalsePending } from '@/shared/generalTypes';
import { appendCorrectPluralisation } from '@/shared/generalTypes';
import { DATE_FNS_INPUT_FORMAT, parseDate } from '../../../../shared/dates';
import {
getMainPlan,
isPaidSubscriptionPlan,
MDA_TEST_USER_HEADER,
} from '../../../../shared/productResponse';
import { MDA_TEST_USER_HEADER } from '../../../../shared/productResponse';
import type {
ProductTypeWithCancellationFlow,
WithProductType,
Expand Down Expand Up @@ -272,12 +265,9 @@ const ConfirmCancellationAndReturnRow = (
const { productDetail, productType } = useContext(
CancellationContext,
) as CancellationContextInterface;
const mainPlan = getMainPlan(productDetail.subscription);
const isSupporterPlusAndFreePeriodOfferIsActive =
featureSwitches.supporterplusCancellationOffer &&
productType.productType === 'supporterplus' &&
isPaidSubscriptionPlan(mainPlan) &&
mainPlan.billingPeriod.toLowerCase() === 'month';
productType.productType === 'supporterplus';

const isContributionAndBreakFeatureIsActive =
featureSwitches.contributionCancellationPause &&
Expand Down

0 comments on commit cfb87ef

Please sign in to comment.