Skip to content

Commit

Permalink
refactor: Update ConnectOverlay component to conditionally set connec…
Browse files Browse the repository at this point in the history
…tion state to 'disconnected' when closing the overlay
  • Loading branch information
daniel-vahn committed May 27, 2024
1 parent e555c30 commit a5cd8c7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/connectOverlay/ConnectOverlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ const ConnectOverlay: React.FC<Props> = ({

// handle connect overlay close
const handleClose = () => {
dispatch(setConnectionState('disconnected'));
if (connectionState === 'connecting') {
dispatch(setConnectionState('disconnected'));
}
close();
};

Expand Down

0 comments on commit a5cd8c7

Please sign in to comment.