From 5be644d3b58be6f607375427c2ae488f4d8a34d8 Mon Sep 17 00:00:00 2001 From: Rohit Date: Wed, 9 Apr 2025 20:47:12 +0530 Subject: [PATCH] feat: add robot retrain id global context --- src/context/globalInfo.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/context/globalInfo.tsx b/src/context/globalInfo.tsx index eaa6ded7..58ee9672 100644 --- a/src/context/globalInfo.tsx +++ b/src/context/globalInfo.tsx @@ -60,6 +60,8 @@ interface GlobalInfo { setRecordingLength: (recordingLength: number) => void; recordingId: string | null; setRecordingId: (newId: string | null) => void; + retrainRobotId: string | null; + setRetrainRobotId: (newId: string | null) => void; recordingName: string; setRecordingName: (recordingName: string) => void; initialUrl: string; @@ -90,6 +92,7 @@ class GlobalInfoStore implements Partial { isOpen: false, }; recordingId = null; + retrainRobotId = null; recordings: string[] = []; rerenderRuns = false; rerenderRobots = false; @@ -119,6 +122,7 @@ export const GlobalInfoProvider = ({ children }: { children: JSX.Element }) => { const [rerenderRobots, setRerenderRobots] = useState(globalInfoStore.rerenderRobots); const [recordingLength, setRecordingLength] = useState(globalInfoStore.recordingLength); const [recordingId, setRecordingId] = useState(globalInfoStore.recordingId); + const [retrainRobotId, setRetrainRobotId] = useState(globalInfoStore.retrainRobotId); const [recordingName, setRecordingName] = useState(globalInfoStore.recordingName); const [isLogin, setIsLogin] = useState(globalInfoStore.isLogin); const [initialUrl, setInitialUrl] = useState(globalInfoStore.initialUrl); @@ -169,6 +173,8 @@ export const GlobalInfoProvider = ({ children }: { children: JSX.Element }) => { setRecordingLength, recordingId, setRecordingId, + retrainRobotId, + setRetrainRobotId, recordingName, setRecordingName, initialUrl,