From 251e22fe9db1c4b0786990406b939f5ace844946 Mon Sep 17 00:00:00 2001 From: Rohit Date: Sat, 1 Feb 2025 11:39:43 +0530 Subject: [PATCH] feat: add robot rerender state --- src/context/globalInfo.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/context/globalInfo.tsx b/src/context/globalInfo.tsx index 3a9203b1..3fb676aa 100644 --- a/src/context/globalInfo.tsx +++ b/src/context/globalInfo.tsx @@ -56,6 +56,8 @@ interface GlobalInfo { setRecordings: (recordings: string[]) => void; rerenderRuns: boolean; setRerenderRuns: (rerenderRuns: boolean) => void; + rerenderRobots: boolean; + setRerenderRobots: (rerenderRuns: boolean) => void; recordingLength: number; setRecordingLength: (recordingLength: number) => void; recordingId: string | null; @@ -93,6 +95,7 @@ class GlobalInfoStore implements Partial { robot = null; recordings: string[] = []; rerenderRuns = false; + rerenderRobots = false; recordingName = ''; initialUrl = 'https://'; recordingUrl = 'https://'; @@ -116,6 +119,7 @@ export const GlobalInfoProvider = ({ children }: { children: JSX.Element }) => { const [notification, setNotification] = useState(globalInfoStore.notification); const [recordings, setRecordings] = useState(globalInfoStore.recordings); const [rerenderRuns, setRerenderRuns] = useState(globalInfoStore.rerenderRuns); + const [rerenderRobots, setRerenderRobots] = useState(globalInfoStore.rerenderRobots); const [recordingLength, setRecordingLength] = useState(globalInfoStore.recordingLength); const [recordingId, setRecordingId] = useState(globalInfoStore.recordingId); const [recordingName, setRecordingName] = useState(globalInfoStore.recordingName); @@ -165,6 +169,8 @@ export const GlobalInfoProvider = ({ children }: { children: JSX.Element }) => { setRecordings, rerenderRuns, setRerenderRuns, + rerenderRobots, + setRerenderRobots, recordingLength, setRecordingLength, recordingId,