diff --git a/src/context/globalInfo.tsx b/src/context/globalInfo.tsx index 137ce14c..58589c3a 100644 --- a/src/context/globalInfo.tsx +++ b/src/context/globalInfo.tsx @@ -22,6 +22,16 @@ interface GlobalInfo { setRecordingName: (recordingName: string) => void; recordingUrl: string; setRecordingUrl: (recordingUrl: string) => void; + currentWorkflowActionsState: { + hasScrapeListAction: boolean; + hasScreenshotAction: boolean; + hasScrapeSchemaAction: boolean; + }; + setCurrentWorkflowActionsState: (actionsState: { + hasScrapeListAction: boolean; + hasScreenshotAction: boolean; + hasScrapeSchemaAction: boolean; + }) => void; }; class GlobalInfoStore implements Partial { @@ -38,6 +48,11 @@ class GlobalInfoStore implements Partial { rerenderRuns = false; recordingName = ''; recordingUrl = 'https://'; + currentWorkflowActionsState = { + hasScrapeListAction: false, + hasScreenshotAction: false, + hasScrapeSchemaAction: false, + }; }; const globalInfoStore = new GlobalInfoStore(); @@ -55,6 +70,7 @@ export const GlobalInfoProvider = ({ children }: { children: JSX.Element }) => { const [recordingId, setRecordingId] = useState(globalInfoStore.recordingId); const [recordingName, setRecordingName] = useState(globalInfoStore.recordingName); const [recordingUrl, setRecordingUrl] = useState(globalInfoStore.recordingUrl); + const [currentWorkflowActionsState, setCurrentWorkflowActionsState] = useState(globalInfoStore.currentWorkflowActionsState); const notify = (severity: 'error' | 'warning' | 'info' | 'success', message: string) => { setNotification({ severity, message, isOpen: true }); @@ -93,6 +109,8 @@ export const GlobalInfoProvider = ({ children }: { children: JSX.Element }) => { setRecordingName, recordingUrl, setRecordingUrl, + currentWorkflowActionsState, + setCurrentWorkflowActionsState, }} > {children}