feat: set workflow as empty on performing reset

This commit is contained in:
RohitR311
2025-01-03 18:40:43 +05:30
parent 609eec49db
commit cc5a456e12

View File

@@ -8,6 +8,8 @@ import { stopRecording } from "../../api/recording";
import { useNavigate } from 'react-router-dom'; import { useNavigate } from 'react-router-dom';
import { GenericModal } from "../atoms/GenericModal"; import { GenericModal } from "../atoms/GenericModal";
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { emptyWorkflow } from '../../shared/constants';
import { useSocketStore } from '../../context/socket';
const BrowserRecordingSave = () => { const BrowserRecordingSave = () => {
const { t } = useTranslation(); const { t } = useTranslation();
@@ -16,6 +18,8 @@ const BrowserRecordingSave = () => {
const { recordingName, browserId, setBrowserId, notify, setCurrentWorkflowActionsState, resetInterpretationLog } = useGlobalInfoStore(); const { recordingName, browserId, setBrowserId, notify, setCurrentWorkflowActionsState, resetInterpretationLog } = useGlobalInfoStore();
const navigate = useNavigate(); const navigate = useNavigate();
const { socket } = useSocketStore();
const { const {
stopGetText, stopGetText,
stopGetList, stopGetList,
@@ -28,6 +32,7 @@ const BrowserRecordingSave = () => {
updateCustomLimit, updateCustomLimit,
setShowLimitOptions, setShowLimitOptions,
setShowPaginationOptions, setShowPaginationOptions,
setWorkflow,
} = useActionContext(); } = useActionContext();
const { browserSteps, deleteBrowserStep } = useBrowserSteps(); const { browserSteps, deleteBrowserStep } = useBrowserSteps();
@@ -62,6 +67,8 @@ const BrowserRecordingSave = () => {
hasScrapeSchemaAction: false hasScrapeSchemaAction: false
}); });
setWorkflow(emptyWorkflow);
resetInterpretationLog(); resetInterpretationLog();
// Clear all browser steps // Clear all browser steps