diff --git a/src/components/connectOverlay/ConnectOverlay.tsx b/src/components/connectOverlay/ConnectOverlay.tsx index 1067e7e..729e0b3 100644 --- a/src/components/connectOverlay/ConnectOverlay.tsx +++ b/src/components/connectOverlay/ConnectOverlay.tsx @@ -63,7 +63,9 @@ const ConnectOverlay: React.FC = ({ // handle connect overlay close const handleClose = () => { - dispatch(setConnectionState('disconnected')); + if (connectionState === 'connecting') { + dispatch(setConnectionState('disconnected')); + } close(); };