Skip to content

Commit

Permalink
Fix type/lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
marcperezmonite committed Feb 4, 2025
1 parent 548efe1 commit ba051de
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,6 @@ const PayableDetailsFormBase = forwardRef<

const className = 'Monite-PayableDetailsForm';


useEffect(() => {
if (
counterpartBankAccountQuery.isSuccess &&
Expand All @@ -352,7 +351,7 @@ const PayableDetailsFormBase = forwardRef<
counterpartBankAccountQuery.data.data,
currentCurrency
);

// Only reset if the value is different
const currentValue = methods.getValues('counterpartBankAccount');
if (currentValue !== defaultBankAccount) {
Expand All @@ -362,13 +361,19 @@ const PayableDetailsFormBase = forwardRef<
});
}
}
}, [counterpartBankAccountQuery.data, currentCurrency, resetField, methods.getValues]);
}, [
counterpartBankAccountQuery.data,
currentCurrency,
resetField,
methods.getValues,
counterpartBankAccountQuery.isSuccess,
methods,
]);

useEffect(() => {
trigger();
}, [trigger]);


return (
<>
<Box
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export interface PayablesDetailsHeaderProps {
payableDetailsFormId: string;
onClose?: () => void;
isPaymentLinkAvailable: boolean;
isProcessingPayment: boolean;
modalComponent: ReactNode;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,20 @@ export interface StyledCardProps extends ComponentProps<typeof Card> {
}

export const SummaryStyledCard = styled(Card, {
shouldForwardProp: (prop) => prop !== 'selected' && prop !== 'isAllItems' && prop !== 'theme',
})(
({ selected, isAllItems, theme }: StyledCardProps) => ({
cursor: 'pointer',
border: `2px solid ${
selected ? theme.palette.primary.main : 'transparent'
}`,
'&:hover': { border: `2px solid ${theme.palette.primary.main}` },
display: 'flex',
padding: '16px 18px',
flexDirection: 'column',
justifyContent: 'center',
height: 80,
minWidth: isAllItems ? '118px' : '180px',
flexShrink: 0,
})
);
shouldForwardProp: (prop) =>
prop !== 'selected' && prop !== 'isAllItems' && prop !== 'theme',
})(({ selected, isAllItems, theme }: StyledCardProps) => ({
cursor: 'pointer',
border: `2px solid ${selected ? theme.palette.primary.main : 'transparent'}`,
'&:hover': { border: `2px solid ${theme.palette.primary.main}` },
display: 'flex',
padding: '16px 18px',
flexDirection: 'column',
justifyContent: 'center',
height: 80,
minWidth: isAllItems ? '118px' : '180px',
flexShrink: 0,
}));

export const summaryCardClassName = 'Monite-SummaryCard';

Expand Down

0 comments on commit ba051de

Please sign in to comment.