Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | 40x 40x 40x 129x 129x 129x 126x 28x 28x 40x | import { CheckoutSelectors, Instrument } from '@bigcommerce/checkout-sdk';
import { createSelector } from 'reselect';
import isInstrumentCardNumberRequired from './isInstrumentCardNumberRequired';
const isInstrumentCardNumberRequiredSelector = createSelector(
({ data }: CheckoutSelectors) => {
const cart = data.getCart();
return cart && cart.lineItems;
},
lineItems => (instrument: Instrument) => {
Iif (!lineItems) {
return false;
}
return isInstrumentCardNumberRequired({
lineItems,
instrument,
});
}
);
export default isInstrumentCardNumberRequiredSelector;
|