3.2.3.1
Fix average to top temps
This commit is contained in:
+3
-3
@@ -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)] : []),
|
||||
]
|
||||
: []),
|
||||
|
||||
Reference in New Issue
Block a user