From 014bce00bdb0c1032b6bb6bcab5fdac6f5ec57db Mon Sep 17 00:00:00 2001 From: RohitR311 Date: Fri, 3 Jan 2025 19:48:47 +0530 Subject: [PATCH] feat: add initialUrl to store the first url --- src/context/globalInfo.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/context/globalInfo.tsx b/src/context/globalInfo.tsx index ac281630..e7ffed6e 100644 --- a/src/context/globalInfo.tsx +++ b/src/context/globalInfo.tsx @@ -20,6 +20,8 @@ interface GlobalInfo { setRecordingId: (newId: string | null) => void; recordingName: string; setRecordingName: (recordingName: string) => void; + initialUrl: string; + setInitialUrl: (initialUrl: string) => void; recordingUrl: string; setRecordingUrl: (recordingUrl: string) => void; currentWorkflowActionsState: { @@ -49,6 +51,7 @@ class GlobalInfoStore implements Partial { recordings: string[] = []; rerenderRuns = false; recordingName = ''; + initialUrl = 'https://'; recordingUrl = 'https://'; currentWorkflowActionsState = { hasScrapeListAction: false, @@ -72,6 +75,7 @@ export const GlobalInfoProvider = ({ children }: { children: JSX.Element }) => { const [recordingLength, setRecordingLength] = useState(globalInfoStore.recordingLength); const [recordingId, setRecordingId] = useState(globalInfoStore.recordingId); const [recordingName, setRecordingName] = useState(globalInfoStore.recordingName); + const [initialUrl, setInitialUrl] = useState(globalInfoStore.initialUrl); const [recordingUrl, setRecordingUrl] = useState(globalInfoStore.recordingUrl); const [currentWorkflowActionsState, setCurrentWorkflowActionsState] = useState(globalInfoStore.currentWorkflowActionsState); const [shouldResetInterpretationLog, setShouldResetInterpretationLog] = useState(globalInfoStore.shouldResetInterpretationLog); @@ -119,6 +123,8 @@ export const GlobalInfoProvider = ({ children }: { children: JSX.Element }) => { setRecordingId, recordingName, setRecordingName, + initialUrl, + setInitialUrl, recordingUrl, setRecordingUrl, currentWorkflowActionsState,