Skip to content

Commit

Permalink
fix: bugfix for isShowing
Browse files Browse the repository at this point in the history
  • Loading branch information
pete-watters committed Dec 14, 2023
1 parent a966065 commit baec9de
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 2 additions & 5 deletions src/app/features/high-fee-drawer/high-fee-drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,8 @@ export function HighFeeDrawer({ learnMoreUrl }: { learnMoreUrl: string }) {
}, [isShowingHighFeeConfirmation, setIsShowingHighFeeConfirmation]);

return (
<BaseDrawer
isShowing={isShowingHighFeeConfirmation}
onClose={() => setIsShowingHighFeeConfirmation(false)}
>
{isShowingHighFeeConfirmation && <HighFeeConfirmation learnMoreUrl={learnMoreUrl} />}
<BaseDrawer isShowing={false} onClose={() => setIsShowingHighFeeConfirmation(false)}>
{false && <HighFeeConfirmation learnMoreUrl={learnMoreUrl} />}
</BaseDrawer>
);
}
4 changes: 3 additions & 1 deletion src/app/ui/components/containers/drawer/base-drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const BaseDrawer = memo(
isWaitingOnPerformedAction,
onClose,
title,

isShowing,
waitingOnPerformedActionMessage,
}: BaseDrawerProps) => {
const navigate = useNavigate();
Expand All @@ -43,6 +43,8 @@ export const BaseDrawer = memo(
};
}, []);

if (!isShowing) return null;

return (
<Modal
title={
Expand Down

0 comments on commit baec9de

Please sign in to comment.