diff --git a/ui/src/App.js b/ui/src/App.js
index 954b4b1..3a9d0d8 100644
--- a/ui/src/App.js
+++ b/ui/src/App.js
@@ -6,19 +6,39 @@ import NotificationsArea from './components/NotificationsArea.js';
import APIAddressField from './components/APIAddressField';
import PourTimeField from './components/PourTimeField';
import SystemControls from './components/SystemControls';
+import SystemStatusArea from './components/SystemStatusArea';
+
+// TODO: Replace this with a real system status
+// replace "water threshold" with "waterThreshold"
+// replace "time left" with "timeLeft"
+// add field "updated"
+const systemStatus = {
+ waterThreshold: 1234,
+ pump: {
+ running: false,
+ timeLeft: 0,
+ },
+ updated: new Date(),
+};
function App() {
const [pourTime, setPourTime] = useState(1000);
-
+ // TODO: Add a fake countdown timer of timeLeft
return (
Tea System UI
+
+
+
diff --git a/ui/src/components/SystemControls.js b/ui/src/components/SystemControls.js
index 961a053..77d014d 100644
--- a/ui/src/components/SystemControls.js
+++ b/ui/src/components/SystemControls.js
@@ -4,7 +4,7 @@ import { Button } from 'react-bootstrap';
import { useWaterPumpAPI } from '../contexts/WaterPumpAPIContext';
import { useNotificationsSystem } from '../contexts/NotificationsContext.js';
-function SystemControls({ pouringTime }) {
+function SystemControls({ pouringTime, systemStatus }) {
const waterPump = useWaterPumpAPI().API;
const NotificationsSystem = useNotificationsSystem();
@@ -26,12 +26,13 @@ function SystemControls({ pouringTime }) {
}
};
+ const isRunning = systemStatus.pump.running;
return (
<>
-