🐛 Fix celcius to farenheit

This commit is contained in:
ajnart
2022-06-06 19:12:59 +02:00
parent 9a3ebb56cb
commit c50e11c75b

View File

@@ -160,7 +160,7 @@ export default function WeatherComponent(props: any) {
return null; return null;
} }
function usePerferedUnit(value: number): string { function usePerferedUnit(value: number): string {
return isFahrenheit ? `${(value * (9 / 5)).toFixed(1)}°F` : `${value.toFixed(1)}°C`; return isFahrenheit ? `${(value * (9 / 5) + 32).toFixed(1)}°F` : `${value.toFixed(1)}°C`;
} }
return ( return (
<Group p="sm" spacing="xs" direction="column"> <Group p="sm" spacing="xs" direction="column">