Skip to content

Commit

Permalink
fix active tab
Browse files Browse the repository at this point in the history
  • Loading branch information
OmerGery committed Jan 22, 2024
1 parent 61021d5 commit 6c0bdc9
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@ const PaymentMethodPopup = ({
}
}, [usePayments.businessPaymentMethods]);

useEffect(() => {
if (!isVisible) {
setActivePaymentTab(
selectedBusinessAccountId ? PAYMENT_MODES.BUSINESS : PAYMENT_MODES.PERSONAL,
);
}
}, [isVisible]);

useEffect(() => {
const updateDefaultPaymentMethod = async () => {
if (selected) {
Expand Down

0 comments on commit 6c0bdc9

Please sign in to comment.