feat: set workflow as empty on performing reset
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user