diff --git a/README.md b/README.md index 8c83651d..15da47bd 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ node - release + release language diff --git a/package.json b/package.json index de402734..bd9837cb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ui", - "version": "0.24.3", + "version": "0.24.4", "private": true, "scripts": { "dev": "react-scripts start", diff --git a/src/components/Connections/Connections.tsx b/src/components/Connections/Connections.tsx index 46ceff4d..d2247bc1 100644 --- a/src/components/Connections/Connections.tsx +++ b/src/components/Connections/Connections.tsx @@ -6,7 +6,8 @@ import useRobot from "../../hooks/useRobot"; import { ReactElement } from "react"; export default function Connections(): ReactElement { - const { responseRobot, isSettedCookie, isRosConnected } = useRobot(); + const { responseRobot, isSettedCookie, isRosConnected, isVDIConnected } = + useRobot(); const { keycloak } = useKeycloak(); return ( @@ -34,9 +35,9 @@ export default function Connections(): ReactElement { /> { setIsVDIConnected(false); }); - function closeConnection() { - typeof isVDIConnected === "boolean" && vdiClient?.close(); - } - - closeConnection(); + typeof isVDIConnected === "boolean" && vdiClient?.close(); - return closeConnection(); + return () => { + vdiClient?.close(); + }; }, [isRobotReady, isSettedCookie, isVDIConnected, responseRobot]); - - useEffect(() => { - console.log("isVDIConnected", isVDIConnected); - }, [isVDIConnected]); // VDI Test Connection function handleGetOrganization() { @@ -473,6 +467,8 @@ export default ({ children }: any) => { setIsSettedCookie, isRosConnected, setIsRosConnected, + isVDIConnected, + setIsVDIConnected, setTopicList, handleForceUpdate, handleResetRobot, diff --git a/src/hooks/useRobot.tsx b/src/hooks/useRobot.tsx index 411bb345..490d6786 100644 --- a/src/hooks/useRobot.tsx +++ b/src/hooks/useRobot.tsx @@ -17,8 +17,8 @@ interface IuseRobot { setIsSettedCookie: any; isRosConnected: boolean | null; setIsRosConnected: any; - adrinState: any; - setAdrinState: any; + isVDIConnected: boolean | null; + setIsVDIConnected: any; handleForceUpdate: any; handleResetRobot: () => void; }