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:
@@ -58,6 +58,7 @@ export function DayForecastModal({
|
||||
const { language, locale, t } = useI18n();
|
||||
const temperatureUnit = useWeatherStore((state) => state.temperatureUnit);
|
||||
const windSpeedUnit = useWeatherStore((state) => state.windSpeedUnit);
|
||||
const precipitationUnit = useWeatherStore((state) => state.precipitationUnit);
|
||||
const closeButtonRef = useRef<HTMLButtonElement>(null);
|
||||
const portalRoot = typeof document === "undefined" ? null : document.body;
|
||||
const maximumWind = useMemo(() => getMaximumWind(hours), [hours]);
|
||||
@@ -150,7 +151,7 @@ export function DayForecastModal({
|
||||
<DayMetric
|
||||
icon={Droplets}
|
||||
label={t("forecast.precipitation")}
|
||||
value={formatForecastRainfall(day.precipitation, language)}
|
||||
value={formatForecastRainfall(day.precipitation, language, precipitationUnit)}
|
||||
/>
|
||||
<DayMetric
|
||||
icon={Wind}
|
||||
|
||||
Reference in New Issue
Block a user