From 90c3c9eb44636d37ed2d6788763fed905c02c907 Mon Sep 17 00:00:00 2001 From: Tanner Date: Thu, 27 Aug 2026 21:26:12 +0000 Subject: [PATCH] refactor: replace individual Lux charts with a single MultiLineChart Co-authored-by: aider (gemini/gemini-3.1-pro-preview) --- client/src/App.js | 61 +++++++++-------------------------------------- 1 file changed, 11 insertions(+), 50 deletions(-) diff --git a/client/src/App.js b/client/src/App.js index 20d8231..5ea73a7 100644 --- a/client/src/App.js +++ b/client/src/App.js @@ -634,52 +634,6 @@ function BedroomSleep({end, duration}) { ); } -function Lux({name, sensorName, end, duration}) { - const [data, loading, tickFormatter, ticks] = 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 HH:mm')} - separator=': ' - /> - - - - - - ); -} - function MultiLineChart({title, measurement, dataKey, sensors, colors, end, duration, yDomain, unitKey, transform}) { const [data, setData] = useState(false); const [loading, setLoading] = useState(false); @@ -904,10 +858,17 @@ function Graphs({end, duration}) { - - - - +