feat: rm set robot global state
This commit is contained in:
@@ -50,8 +50,6 @@ interface GlobalInfo {
|
|||||||
closeNotify: () => void;
|
closeNotify: () => void;
|
||||||
isLogin: boolean;
|
isLogin: boolean;
|
||||||
setIsLogin: (isLogin: boolean) => void;
|
setIsLogin: (isLogin: boolean) => void;
|
||||||
robot: RobotSettings | null;
|
|
||||||
setRobot: (robot: RobotSettings | null | ((prev: RobotSettings | null) => RobotSettings | null)) => void;
|
|
||||||
recordings: string[];
|
recordings: string[];
|
||||||
setRecordings: (recordings: string[]) => void;
|
setRecordings: (recordings: string[]) => void;
|
||||||
rerenderRuns: boolean;
|
rerenderRuns: boolean;
|
||||||
@@ -92,7 +90,6 @@ class GlobalInfoStore implements Partial<GlobalInfo> {
|
|||||||
isOpen: false,
|
isOpen: false,
|
||||||
};
|
};
|
||||||
recordingId = null;
|
recordingId = null;
|
||||||
robot = null;
|
|
||||||
recordings: string[] = [];
|
recordings: string[] = [];
|
||||||
rerenderRuns = false;
|
rerenderRuns = false;
|
||||||
rerenderRobots = false;
|
rerenderRobots = false;
|
||||||
@@ -128,7 +125,6 @@ export const GlobalInfoProvider = ({ children }: { children: JSX.Element }) => {
|
|||||||
const [recordingUrl, setRecordingUrl] = useState<string>(globalInfoStore.recordingUrl);
|
const [recordingUrl, setRecordingUrl] = useState<string>(globalInfoStore.recordingUrl);
|
||||||
const [currentWorkflowActionsState, setCurrentWorkflowActionsState] = useState(globalInfoStore.currentWorkflowActionsState);
|
const [currentWorkflowActionsState, setCurrentWorkflowActionsState] = useState(globalInfoStore.currentWorkflowActionsState);
|
||||||
const [shouldResetInterpretationLog, setShouldResetInterpretationLog] = useState<boolean>(globalInfoStore.shouldResetInterpretationLog);
|
const [shouldResetInterpretationLog, setShouldResetInterpretationLog] = useState<boolean>(globalInfoStore.shouldResetInterpretationLog);
|
||||||
const [robot, setRobot] = useState<RobotSettings | null>(null);
|
|
||||||
|
|
||||||
const notify = (severity: 'error' | 'warning' | 'info' | 'success', message: string) => {
|
const notify = (severity: 'error' | 'warning' | 'info' | 'success', message: string) => {
|
||||||
setNotification({ severity, message, isOpen: true });
|
setNotification({ severity, message, isOpen: true });
|
||||||
@@ -163,8 +159,6 @@ export const GlobalInfoProvider = ({ children }: { children: JSX.Element }) => {
|
|||||||
notification,
|
notification,
|
||||||
notify,
|
notify,
|
||||||
closeNotify,
|
closeNotify,
|
||||||
robot,
|
|
||||||
setRobot,
|
|
||||||
recordings,
|
recordings,
|
||||||
setRecordings,
|
setRecordings,
|
||||||
rerenderRuns,
|
rerenderRuns,
|
||||||
|
|||||||
Reference in New Issue
Block a user