Skip to content

Commit

Permalink
feat: add initialUrl to store the first url
Browse files Browse the repository at this point in the history
  • Loading branch information
RohitR311 committed Jan 3, 2025
1 parent fcd9c2f commit 014bce0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/context/globalInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -49,6 +51,7 @@ class GlobalInfoStore implements Partial<GlobalInfo> {
recordings: string[] = [];
rerenderRuns = false;
recordingName = '';
initialUrl = 'https://';
recordingUrl = 'https://';
currentWorkflowActionsState = {
hasScrapeListAction: false,
Expand All @@ -72,6 +75,7 @@ export const GlobalInfoProvider = ({ children }: { children: JSX.Element }) => {
const [recordingLength, setRecordingLength] = useState<number>(globalInfoStore.recordingLength);
const [recordingId, setRecordingId] = useState<string | null>(globalInfoStore.recordingId);
const [recordingName, setRecordingName] = useState<string>(globalInfoStore.recordingName);
const [initialUrl, setInitialUrl] = useState<string>(globalInfoStore.initialUrl);
const [recordingUrl, setRecordingUrl] = useState<string>(globalInfoStore.recordingUrl);
const [currentWorkflowActionsState, setCurrentWorkflowActionsState] = useState(globalInfoStore.currentWorkflowActionsState);
const [shouldResetInterpretationLog, setShouldResetInterpretationLog] = useState<boolean>(globalInfoStore.shouldResetInterpretationLog);
Expand Down Expand Up @@ -119,6 +123,8 @@ export const GlobalInfoProvider = ({ children }: { children: JSX.Element }) => {
setRecordingId,
recordingName,
setRecordingName,
initialUrl,
setInitialUrl,
recordingUrl,
setRecordingUrl,
currentWorkflowActionsState,
Expand Down

0 comments on commit 014bce0

Please sign in to comment.