Fix average to top temps
This commit is contained in:
fraxle
2026-07-07 16:11:38 +01:00
parent 96799e2afa
commit 6eb1b277d5
3 changed files with 52 additions and 34 deletions
+3 -3
View File
@@ -1649,8 +1649,8 @@ export function UTCIForecast() {
const hasFeltAnchor = glanceSummary.some(i => i.label === 'Peak felt temp');
const comfortItem = hasFeltAnchor ? glanceSummary.find(i => i.label === 'Comfortable window') : null;
const drivingItem = hasFeltAnchor ? glanceSummary.find(i => i.label === 'Good driving time') : null;
const climateItem = hasFeltAnchor ? glanceSummary.find(i => i.label === '1991-2020 Average') : null;
const restSummary = glanceSummary.filter(i => !(hasFeltAnchor && (i.label === 'Comfortable window' || i.label === 'Good driving time' || i.label === '1991-2020 Average')));
const climateRows = hasFeltAnchor ? glanceSummary.filter(i => i.label === '1991-2020 High' || i.label === '1991-2020 Average') : [];
const restSummary = glanceSummary.filter(i => !(hasFeltAnchor && (i.label === 'Comfortable window' || i.label === 'Good driving time' || i.label === '1991-2020 High' || i.label === '1991-2020 Average')));
return [
...restSummary.flatMap(item => [
renderRow(item),
@@ -1659,7 +1659,7 @@ export function UTCIForecast() {
? [
...heatEvents.map(e => renderRow(e, 'ev-')),
...(drivingItem ? [renderRow(drivingItem)] : []),
...(climateItem ? [renderRow(climateItem)] : []),
...climateRows.map(item => renderRow(item)),
...(comfortItem ? [renderRow(comfortItem)] : []),
]
: []),