From 968b13b1dc01818e90d17ed5259dcb1f69925e67 Mon Sep 17 00:00:00 2001 From: Ghost <31184695+GHOSCHT@users.noreply.github.com> Date: Sat, 1 Aug 2020 17:13:11 +0200 Subject: [PATCH] Remove test component --- Dashboard/app/renderer/app.js | 1 - Dashboard/app/renderer/components/Test.js | 47 ----------------------- 2 files changed, 48 deletions(-) delete mode 100644 Dashboard/app/renderer/components/Test.js diff --git a/Dashboard/app/renderer/app.js b/Dashboard/app/renderer/app.js index 6729aad..81647c7 100644 --- a/Dashboard/app/renderer/app.js +++ b/Dashboard/app/renderer/app.js @@ -1,6 +1,5 @@ import React from 'react'; import ReactDOM from 'react-dom'; -import Test from './components/Test'; import { Provider } from 'react-redux'; import { createStore } from 'redux'; import rootReducer from './store/reducers'; diff --git a/Dashboard/app/renderer/components/Test.js b/Dashboard/app/renderer/components/Test.js deleted file mode 100644 index dd17330..0000000 --- a/Dashboard/app/renderer/components/Test.js +++ /dev/null @@ -1,47 +0,0 @@ -import React, { useState } from 'react'; -import { useSelector, useDispatch } from 'react-redux/'; - -export default function Test() { - const comConnection = useSelector((state) => state.comConnectionReducer); - const [comData, setComData] = useState(''); - - comConnection.parser.on('data', (data) => { - setComData(data); - }); - - const triggerOn = () => { - comConnection.port.write('on'); - }; - const triggerOff = () => { - comConnection.port.write('off'); - }; - - const triggerOne = () => { - comConnection.port.write('0'); - }; - const triggerTwo = () => { - comConnection.port.write('1'); - }; - - return ( -
{comData}
-