Skip to content

Commit

Permalink
feat(version): release 0.24.8 version
Browse files Browse the repository at this point in the history
  • Loading branch information
gokhangunduz committed Dec 20, 2023
1 parent 4ab5b1d commit fff6d96
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 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.7-red" alt="release">
<img src="https://img.shields.io/badge/release-v0.24.8-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.7",
"version": "0.24.8",
"private": true,
"scripts": {
"dev": "react-scripts start",
Expand Down
32 changes: 16 additions & 16 deletions src/contexts/RobotContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,30 +180,30 @@ export default ({ children }: any) => {

// ROS Bridge Connector
useEffect(() => {
if (
const rosClient: ROSLIB.Ros | null =
isSettedCookie &&
responseRobot?.bridgeIngressEndpoint?.split("://")[0] === "wss" &&
!envApplication
) {
const rosClient: ROSLIB.Ros = new ROSLIB.Ros({
url: responseRobot?.bridgeIngressEndpoint,
});
? new ROSLIB.Ros({
url: responseRobot?.bridgeIngressEndpoint,
})
: null;

setRos(ros);
setRos(ros);

rosClient?.on("connection", function () {
setIsRosConnected(true);
});
rosClient?.on("error", function (error) {
setIsRosConnected(false);
});
rosClient?.on("close", function () {
setIsRosConnected(false);
});
}
ros?.on("connection", function () {
isRosConnected === null && setIsRosConnected(true);
});
ros?.on("error", function (error) {
isRosConnected === null && setIsRosConnected(false);
});
ros?.on("close", function () {
isRosConnected === null && setIsRosConnected(false);
});

return () => {
ros?.close();
rosClient?.close();
};
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [responseRobot, isSettedCookie]);
Expand Down

0 comments on commit fff6d96

Please sign in to comment.