Skip to content

Commit

Permalink
chore: minor QA finds & cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
borcherd committed Feb 10, 2025
1 parent a149e54 commit 8390e57
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ export const LendingPortfolio = () => {
fetchMrgnlendState={fetchMrgnlendState}
closeOnSwitch={true}
popoverContentAlign="start"
// showAddAccountButton={false}
processOpts={{
...priorityFees,
broadcastType,
Expand Down
13 changes: 7 additions & 6 deletions packages/mrgn-ui/src/components/action-box-v2/action-box.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,13 @@ const BorrowLend = (
combinedProps = lendProps as LendBoxProps;
}

const [shouldBeHidden, setShouldBeHidden] = React.useState(combinedProps.searchMode);
const dialogProps = actionBoxProps.isDialog ? { ...actionBoxProps.dialogProps, hidden: shouldBeHidden } : undefined;
const _actionBoxProps = actionBoxProps.isDialog ? { ...actionBoxProps, dialogProps } : actionBoxProps;
const [shouldBeHidden, setShouldBeHidden] = React.useState<boolean>(!!combinedProps.searchMode);
if (actionBoxProps.isDialog) {
actionBoxProps.dialogProps = { ...actionBoxProps.dialogProps, hidden: shouldBeHidden };
}

return (
<ActionBox {..._actionBoxProps}>
<ActionBox {...actionBoxProps}>
<ActionBoxWrapper showSettings={false} isDialog={actionBoxProps.isDialog} actionMode={ActionType.Deposit}>
<ActionBoxNavigator
selectedAction={selectedAction}
Expand All @@ -142,13 +143,13 @@ const BorrowLend = (
<LendBox
{...combinedProps}
requestedLendType={ActionType.Deposit}
onCloseDialog={dialogProps?.onClose}
onCloseDialog={actionBoxProps.isDialog ? actionBoxProps.dialogProps?.onClose : undefined}
setShouldBeHidden={setShouldBeHidden}
/>
<LendBox
{...combinedProps}
requestedLendType={ActionType.Borrow}
onCloseDialog={dialogProps?.onClose}
onCloseDialog={actionBoxProps.isDialog ? actionBoxProps.dialogProps?.onClose : undefined}
setShouldBeHidden={setShouldBeHidden}
/>
</ActionBoxNavigator>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { ActionDialogProps } from "~/components/action-box-v2/components";

type ActionBoxDialogProps = {
isDialog: true;
dialogProps?: ActionDialogProps;
dialogProps: ActionDialogProps;
};

type ActionBoxWithoutDailogProps = {
Expand Down

0 comments on commit 8390e57

Please sign in to comment.