Skip to content

Commit 0f37b99

Browse files
authored
fix(checkout-widgets): Fix coin drawer drop down when only one alternative exists (#2717)
1 parent f6b8daa commit 0f37b99

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

packages/checkout/widgets-lib/src/widgets/sale/components/PaymentOptions.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Box, MenuItemSize } from '@biom3/react';
22

33
import { SalePaymentTypes } from '@imtbl/checkout-sdk';
44
import { motion } from 'framer-motion';
5-
import { useEffect, useMemo } from 'react';
5+
import { useMemo } from 'react';
66
import { listItemVariants, listVariants } from '../../../lib/animation/listAnimation';
77
import { PaymentOption } from './PaymentOption';
88

@@ -37,12 +37,6 @@ export function PaymentOptions(props: PaymentOptionsProps) {
3737
[paymentOptions, disabledOptions, hideDisabledOptions],
3838
);
3939

40-
useEffect(() => {
41-
if (options.length === 1) {
42-
onClick(options[0]);
43-
}
44-
}, [options, onClick]);
45-
4640
return (
4741
<Box
4842
testId="payment-options-list"

0 commit comments

Comments
 (0)