From 5a494cb53b73ff1ff5902ab394c169f15cb45413 Mon Sep 17 00:00:00 2001 From: Rohit Date: Sat, 25 Jan 2025 17:49:50 +0530 Subject: [PATCH] feat: set login status global info --- src/context/globalInfo.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/context/globalInfo.tsx b/src/context/globalInfo.tsx index 92ce7e62..28d65b34 100644 --- a/src/context/globalInfo.tsx +++ b/src/context/globalInfo.tsx @@ -10,6 +10,8 @@ interface GlobalInfo { notification: AlertSnackbarProps; notify: (severity: 'error' | 'warning' | 'info' | 'success', message: string) => void; closeNotify: () => void; + isLogin: boolean; + setIsLogin: (isLogin: boolean) => void; recordings: string[]; setRecordings: (recordings: string[]) => void; rerenderRuns: boolean; @@ -53,6 +55,7 @@ class GlobalInfoStore implements Partial { recordingName = ''; initialUrl = 'https://'; recordingUrl = 'https://'; + isLogin = false; currentWorkflowActionsState = { hasScrapeListAction: false, hasScreenshotAction: false, @@ -75,6 +78,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 [isLogin, setIsLogin] = useState(globalInfoStore.isLogin); const [initialUrl, setInitialUrl] = useState(globalInfoStore.initialUrl); const [recordingUrl, setRecordingUrl] = useState(globalInfoStore.recordingUrl); const [currentWorkflowActionsState, setCurrentWorkflowActionsState] = useState(globalInfoStore.currentWorkflowActionsState); @@ -127,6 +131,8 @@ export const GlobalInfoProvider = ({ children }: { children: JSX.Element }) => { setInitialUrl, recordingUrl, setRecordingUrl, + isLogin, + setIsLogin, currentWorkflowActionsState, setCurrentWorkflowActionsState, shouldResetInterpretationLog,