feat: navigate to initial url on reset
This commit is contained in:
@@ -15,7 +15,7 @@ const BrowserRecordingSave = () => {
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const [openDiscardModal, setOpenDiscardModal] = useState<boolean>(false);
|
const [openDiscardModal, setOpenDiscardModal] = useState<boolean>(false);
|
||||||
const [openResetModal, setOpenResetModal] = useState<boolean>(false);
|
const [openResetModal, setOpenResetModal] = useState<boolean>(false);
|
||||||
const { recordingName, browserId, setBrowserId, notify, setCurrentWorkflowActionsState, resetInterpretationLog } = useGlobalInfoStore();
|
const { recordingName, browserId, initialUrl, setRecordingUrl, setBrowserId, notify, setCurrentWorkflowActionsState, resetInterpretationLog } = useGlobalInfoStore();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
const { socket } = useSocketStore();
|
const { socket } = useSocketStore();
|
||||||
@@ -76,6 +76,13 @@ const BrowserRecordingSave = () => {
|
|||||||
deleteBrowserStep(step.id);
|
deleteBrowserStep(step.id);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (socket) {
|
||||||
|
socket?.emit('new-recording');
|
||||||
|
socket.emit('input:url', initialUrl);
|
||||||
|
// Update the URL in the navbar to match
|
||||||
|
setRecordingUrl(initialUrl);
|
||||||
|
}
|
||||||
|
|
||||||
// Close the reset confirmation modal
|
// Close the reset confirmation modal
|
||||||
setOpenResetModal(false);
|
setOpenResetModal(false);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user