From e7cde4c2fb88eed054707c3363d8f6fb0577629a Mon Sep 17 00:00:00 2001 From: accius Date: Mon, 2 Feb 2026 23:16:16 -0500 Subject: [PATCH] header weather --- src/components/Header.jsx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/components/Header.jsx b/src/components/Header.jsx index a91724e..db8df60 100644 --- a/src/components/Header.jsx +++ b/src/components/Header.jsx @@ -77,14 +77,21 @@ export const Header = ({ {/* Weather & Solar Stats */}
- {localWeather?.data && ( -
+ {localWeather?.data && (() => { + const t = localWeather.data.temp; + const unit = localWeather.data.tempUnit || 'F'; + const tempF = unit === 'C' ? Math.round(t * 9/5 + 32) : t; + const tempC = unit === 'F' ? Math.round((t - 32) * 5/9) : t; + const windLabel = localWeather.data.windUnit || 'mph'; + return ( +
{localWeather.data.icon} - {localWeather.data.temp}°F/{Math.round((localWeather.data.temp - 32) * 5/9)}°C + {tempF}°F/{tempC}°C
- )} + ); + })()}
SFI {spaceWeather?.data?.solarFlux || '--'}