feat: add weather unit preferences
Some checks failed
CI / Lint, test, typecheck and build (push) Has been cancelled

This commit is contained in:
zv
2026-07-04 20:16:11 +02:00
parent ab6b7b414f
commit 91acdb39b8
27 changed files with 623 additions and 76 deletions

View File

@@ -33,6 +33,7 @@ export function WeatherBriefCard({
const selectedLocation = useWeatherStore((state) => state.selectedLocation);
const temperatureUnit = useWeatherStore((state) => state.temperatureUnit);
const windSpeedUnit = useWeatherStore((state) => state.windSpeedUnit);
const precipitationUnit = useWeatherStore((state) => state.precipitationUnit);
const isGlobalLocation = region === "GLOBAL";
const province = isGlobalLocation
? null
@@ -50,6 +51,7 @@ export function WeatherBriefCard({
language,
temperatureUnit,
windSpeedUnit,
precipitationUnit,
});
}, [
forecast,
@@ -61,6 +63,7 @@ export function WeatherBriefCard({
selectedLocation?.countyTeryt,
temperatureUnit,
windSpeedUnit,
precipitationUnit,
]);
const tomorrowBrief = useMemo(() => {
if (!forecast) return null;
@@ -73,6 +76,7 @@ export function WeatherBriefCard({
language,
temperatureUnit,
windSpeedUnit,
precipitationUnit,
});
}, [
forecast,
@@ -84,6 +88,7 @@ export function WeatherBriefCard({
selectedLocation?.countyTeryt,
temperatureUnit,
windSpeedUnit,
precipitationUnit,
]);
if (!Number.isFinite(latitude) || !Number.isFinite(longitude) || isPending) {