diff --git a/client/src/App.js b/client/src/App.js
index 56951d7..434993b 100644
--- a/client/src/App.js
+++ b/client/src/App.js
@@ -1088,100 +1088,12 @@ function BedroomSleep({end, duration}) {
);
}
-function LivingRoomLux({end, duration}) {
- const [data, loading, tickFormatter] = useSensor('lux', 'Living Room', end, duration);
+function Lux({name, sensorName, end, duration}) {
+ const [data, loading, tickFormatter] = useSensor('lux', sensorName, end, duration);
return (
x.lux?.toFixed(1) + ' lx'}
- loading={loading}
- >
-
-
-
-
-
- v.toFixed(1) + units[name]}
- labelFormatter={timeStr => moment(timeStr).tz('America/Edmonton').format('ddd MMM DD h:mm A')}
- separator=': '
- />
-
-
-
-
-
- );
-}
-
-function KitchenLux({end, duration}) {
- const [data, loading, tickFormatter] = useSensor('lux', 'Kitchen', end, duration);
-
- return (
- x.lux?.toFixed(1) + ' lx'}
- loading={loading}
- >
-
-
-
-
-
- v.toFixed(1) + units[name]}
- labelFormatter={timeStr => moment(timeStr).tz('America/Edmonton').format('ddd MMM DD h:mm A')}
- separator=': '
- />
-
-
-
-
-
- );
-}
-
-function BedroomLux({end, duration}) {
- const [data, loading, tickFormatter] = useSensor('lux', 'Bedroom', end, duration);
-
- return (
- x.lux?.toFixed(1) + ' lx'}
loading={loading}
@@ -1292,9 +1204,9 @@ function Graphs({end, duration}) {
-
-
-
+
+
+