From 74f6df30e4c3e512945cfc1550f645d2bc5ce12f Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 7 Aug 2024 21:39:23 +0200 Subject: [PATCH] added direction button and drive to point button --- package-lock.json | 1 + package.json | 1 + src/App.js | 42 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+) diff --git a/package-lock.json b/package-lock.json index 9a19958..0e7d572 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,7 @@ "name": "camera-slider-web", "version": "0.1.0", "dependencies": { + "@ant-design/icons": "^5.4.0", "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", diff --git a/package.json b/package.json index 763d960..4d6232d 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "0.1.0", "private": true, "dependencies": { + "@ant-design/icons": "^5.4.0", "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", diff --git a/src/App.js b/src/App.js index 49bed76..1e5948b 100644 --- a/src/App.js +++ b/src/App.js @@ -1,7 +1,9 @@ +import { ArrowLeftOutlined, ArrowRightOutlined } from "@ant-design/icons"; import { Button, Card, Col, + Divider, Form, Grid, InputNumber, @@ -35,6 +37,7 @@ function App() { const [distance, setDistance] = useState([20, 50]); const [acceleration, setAcceleration] = useState(0); + const [direction, setDirection] = useState(0); useEffect(() => { // todo: fetch to esp to get current values @@ -64,6 +67,11 @@ function App() { onFinish={() => { console.log("finish"); + form + .validateFields() + .then((values) => {}) + .catch((err) => console.error(err)); + // todo: fetch to update values }} > @@ -168,12 +176,46 @@ function App() { + + + + + + + + + + + + + + + );