Skip to content

Commit

Permalink
refactor(connections): 🎉 add ros connection control functions
Browse files Browse the repository at this point in the history
  • Loading branch information
gokhangunduz committed Dec 20, 2023
1 parent 2806011 commit 6af1737
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
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.23.4",
"version": "0.23.5",
"private": true,
"scripts": {
"dev": "react-scripts start",
Expand Down
4 changes: 4 additions & 0 deletions src/components/Connections/Connections.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ export default function Connections(): ReactElement {
} else {
rosClient?.close();
}

return () => {
rosClient?.close();
};
}, [
isRobotReady,
isSettedCookie,
Expand Down
4 changes: 2 additions & 2 deletions src/layouts/EnvironmentPageLayout/EnvironmentPageLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Fragment, ReactElement } from "react";
import EnvironmentHeader from "../../components/EnvironmentHeader/EnvironmentHeader";
import HiddenFrame from "../../components/HiddenFrame/HiddenFrame";
import { envApplication } from "../../helpers/envProvider";
import RosConnector from "../../components/RosConnector/RosConnector";
// import RosConnector from "../../components/RosConnector/RosConnector";
import Overview from "../../pages/EnvironmentPage/Overview/Overview";
import MissionContext from "../../contexts/MissionContext";
import BarcodeContext from "../../contexts/BarcodeContext";
Expand All @@ -24,7 +24,7 @@ export default function EnvironmentPageLayout(): ReactElement {
<Fragment>
<div className="flex h-full flex-col gap-6">
<EnvironmentHeader />
{!envApplication && <RosConnector />}
{/* {!envApplication && <RosConnector />} */}

{(() => {
switch (activeTab) {
Expand Down

0 comments on commit 6af1737

Please sign in to comment.