Skip to content

Commit

Permalink
comment out code
Browse files Browse the repository at this point in the history
  • Loading branch information
GHaberis committed Oct 28, 2024
1 parent 995f816 commit e453789
Showing 1 changed file with 43 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit e453789

Please sign in to comment.