diff --git a/app/components/StepsOfStepper/ScanQRStep.tsx b/app/components/StepsOfStepper/ScanQRStep.tsx index d957cd3..9ba5e47 100644 --- a/app/components/StepsOfStepper/ScanQRStep.tsx +++ b/app/components/StepsOfStepper/ScanQRStep.tsx @@ -65,7 +65,6 @@ const ScanQRStep: React.FC = () => { ); if (roomId) { setRoomID(roomId); - clearInterval(getRoomIdInterval); } }, 1000); diff --git a/app/containers/DeskreenStepper.tsx b/app/containers/DeskreenStepper.tsx index 679f04c..27ca1a4 100644 --- a/app/containers/DeskreenStepper.tsx +++ b/app/containers/DeskreenStepper.tsx @@ -174,6 +174,7 @@ const DeskreenStepper = React.forwardRef((_props, ref) => { setPendingConnectionDevice(null); setIsUserAllowedConnection(false); + ipcRenderer.invoke(IpcEvents.ResetWaitingForConnectionSharingSession); ipcRenderer.invoke(IpcEvents.CreateWaitingForConnectionSharingSession); }, []); @@ -186,14 +187,11 @@ const DeskreenStepper = React.forwardRef((_props, ref) => { ipcRenderer.invoke(IpcEvents.CreateWaitingForConnectionSharingSession); }, []); - React.useImperativeHandle(ref, () => ({ - handleReset() { - handleResetWithSharingSessionRestart(); - }, - })); - const handleCancelAlert = async () => { setIsAlertOpen(false); + setActiveStep(0); + setPendingConnectionDevice(null); + setIsUserAllowedConnection(false); ipcRenderer.invoke(IpcEvents.ResetWaitingForConnectionSharingSession); ipcRenderer.invoke(IpcEvents.CreateWaitingForConnectionSharingSession);