diff --git a/web/src/app/consumption/page.tsx b/web/src/app/consumption/page.tsx index 5e7294f..163546a 100644 --- a/web/src/app/consumption/page.tsx +++ b/web/src/app/consumption/page.tsx @@ -28,7 +28,8 @@ export default async function ConsumptionPage({ const chartDays = days.map((day) => ({ date: day.date, kwh: day.day.kwh, km: day.day.km })); const total = sumDays(days); - const lifetime = days[days.length - 1].lifetime; + // Lifetime is derived: the sum of every day's totals, same as the backend computes. + const lifetime = { km: total.km, kwh: total.kwh, hours: total.hours, socDrop: 0 }; // Newest first for reading; the charts above keep chronological order. const table = [...days].reverse(); @@ -91,7 +92,7 @@ export default async function ConsumptionPage({