From 42abc1b5722cdf60f7e85f9524c81ee53ae30ef8 Mon Sep 17 00:00:00 2001 From: GHOSCHT <31184695+GHOSCHT@users.noreply.github.com> Date: Fri, 31 Dec 2021 21:46:45 +0100 Subject: [PATCH] Remove unnecessary code --- Dashboard/src/App.tsx | 12 +++--- .../actions/asyncSerialConnectionActions.ts | 43 ------------------- .../redux/actions/serialConnectionActions.ts | 23 ---------- Dashboard/src/redux/store/root-reducer.ts | 2 +- 4 files changed, 6 insertions(+), 74 deletions(-) delete mode 100644 Dashboard/src/redux/actions/asyncSerialConnectionActions.ts delete mode 100644 Dashboard/src/redux/actions/serialConnectionActions.ts diff --git a/Dashboard/src/App.tsx b/Dashboard/src/App.tsx index 0bb926d..2693f1c 100644 --- a/Dashboard/src/App.tsx +++ b/Dashboard/src/App.tsx @@ -1,10 +1,8 @@ import React, { useState } from "react"; import { createGlobalStyle } from "styled-components"; -import { useDispatch } from "react-redux"; +// import { useDispatch } from "react-redux"; import Select from "react-select"; import SerialPort from "serialport"; -import { connect, disconnect } from "./redux/actions/asyncSerialConnectionActions"; -import { setSerialPort } from "./redux/actions/serialConnectionActions"; import KnobSection from "./Components/KnobSection"; const GlobalStyle = createGlobalStyle` @@ -28,14 +26,14 @@ const fetchPorts = async () => { }; const App = () => { - const dispatch = useDispatch(); + // const dispatch = useDispatch(); fetchPorts(); const [portSelectionValue, setPortSelectionValue] = useState(options[0]); const handlePortChange = async (selectedOption: any) => { setPortSelectionValue(selectedOption); - dispatch(setSerialPort(selectedOption.value)); + // dispatch(setSerialPort(selectedOption.value)); }; return ( @@ -45,7 +43,7 @@ const App = () => {