From e45378908648cc71843d67fd760d842bcc825173 Mon Sep 17 00:00:00 2001 From: GHaberis Date: Mon, 28 Oct 2024 13:53:29 +0000 Subject: [PATCH] comment out code --- .../product/contributionsSideEffects.ts | 86 +++++++++---------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/support-frontend/assets/helpers/redux/checkout/product/contributionsSideEffects.ts b/support-frontend/assets/helpers/redux/checkout/product/contributionsSideEffects.ts index 26f7cd90ee..c3464f4646 100644 --- a/support-frontend/assets/helpers/redux/checkout/product/contributionsSideEffects.ts +++ b/support-frontend/assets/helpers/redux/checkout/product/contributionsSideEffects.ts @@ -5,10 +5,10 @@ import type { ContributionsStartListening } from 'helpers/redux/contributionsSto import * as storage from 'helpers/storage/storage'; import { trackComponentClick } from 'helpers/tracking/behaviour'; // import { sendEventContributionCartValue } from 'helpers/tracking/quantumMetric'; -import { threeTierCheckoutEnabled } from 'pages/supporter-plus-landing/setup/threeTierChecks'; +// import { threeTierCheckoutEnabled } from 'pages/supporter-plus-landing/setup/threeTierChecks'; import { validateForm } from '../checkoutActions'; import { - setAllAmounts, + // setAllAmounts, setOtherAmountError, setProductType, setSelectedAmount, @@ -21,53 +21,53 @@ import { isContribution, } from './selectors/productType'; -const shouldSendEventContributionCartValue = isAnyOf( - setAllAmounts, - setProductType, - setSelectedAmount, -); +// const shouldSendEventContributionCartValue = isAnyOf( +// setAllAmounts, +// setProductType, +// setSelectedAmount, +// ); const validatesOtherAmountField = isAnyOf(validateForm, validateOtherAmount); export function addProductSideEffects( startListening: ContributionsStartListening, ): void { - startListening({ - matcher: shouldSendEventContributionCartValue, - effect(_, listenerApi) { - const { - contributionAmount, - contributionType, - // contributionCurrency - } = getContributionCartValueData(listenerApi.getState()); - - if (!contributionAmount) { - return; - } - - const isMonthlyOrAnnual = ['MONTHLY', 'ANNUAL'].includes( - contributionType, - ); - - const commonState = listenerApi.getState().common; - - if ( - threeTierCheckoutEnabled( - commonState.abParticipations, - commonState.amounts, - ) && - isMonthlyOrAnnual - ) { - return; - } - - // sendEventContributionCartValue( - // contributionAmount.toString(), - // contributionType, - // contributionCurrency, - // ); - }, - }); + // startListening({ + // matcher: shouldSendEventContributionCartValue, + // effect(_, listenerApi) { + // const { + // contributionAmount, + // contributionType, + // // contributionCurrency + // } = getContributionCartValueData(listenerApi.getState()); + + // if (!contributionAmount) { + // return; + // } + + // const isMonthlyOrAnnual = ['MONTHLY', 'ANNUAL'].includes( + // contributionType, + // ); + + // const commonState = listenerApi.getState().common; + + // if ( + // threeTierCheckoutEnabled( + // commonState.abParticipations, + // commonState.amounts, + // ) && + // isMonthlyOrAnnual + // ) { + // return; + // } + + // sendEventContributionCartValue( + // contributionAmount.toString(), + // contributionType, + // contributionCurrency, + // ); + // }, + // }); startListening({ actionCreator: setProductType,