Skip to content

Commit

Permalink
feat(version): release 0.24.4 version
Browse files Browse the repository at this point in the history
  • Loading branch information
gokhangunduz committed Dec 20, 2023
1 parent 98bd089 commit 6ef6171
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 19 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<img src="https://img.shields.io/badge/nodejs-18.18.2-dgreen" alt="node">
</a>
<a href="https://github.com/robolaunch/ui/releases">
<img src="https://img.shields.io/badge/release-v0.24.2-red" alt="release">
<img src="https://img.shields.io/badge/release-v0.24.4-red" alt="release">
</a>
<a href="#">
<img src="https://img.shields.io/badge/language-typescript-blue" alt="language">
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ui",
"version": "0.24.3",
"version": "0.24.4",
"private": true,
"scripts": {
"dev": "react-scripts start",
Expand Down
11 changes: 6 additions & 5 deletions src/components/Connections/Connections.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -34,9 +35,9 @@ export default function Connections(): ReactElement {
/>
<StateCell
state={
isSettedCookie === undefined
isVDIConnected === null
? "Waiting"
: isSettedCookie
: isVDIConnected
? "Connected"
: "Warning"
}
Expand Down Expand Up @@ -71,9 +72,9 @@ export default function Connections(): ReactElement {
/>
<StateCell
state={
isSettedCookie === undefined
isVDIConnected === null
? "Waiting"
: isSettedCookie
: isVDIConnected
? "Connected"
: "Warning"
}
Expand Down
16 changes: 6 additions & 10 deletions src/contexts/RobotContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -274,18 +274,12 @@ export default ({ children }: any) => {
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() {
Expand Down Expand Up @@ -473,6 +467,8 @@ export default ({ children }: any) => {
setIsSettedCookie,
isRosConnected,
setIsRosConnected,
isVDIConnected,
setIsVDIConnected,
setTopicList,
handleForceUpdate,
handleResetRobot,
Expand Down
4 changes: 2 additions & 2 deletions src/hooks/useRobot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 6ef6171

Please sign in to comment.