feat: add weather unit preferences
Some checks failed
CI / Lint, test, typecheck and build (push) Has been cancelled
Some checks failed
CI / Lint, test, typecheck and build (push) Has been cancelled
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user