fix imperial speed input, closes #46

This commit is contained in:
vcoppe
2024-08-09 23:28:59 +02:00
parent 52e76663f4
commit 5b877e1ef5

View File

@@ -10,7 +10,7 @@
import {
distancePerHourToSecondsPerDistance,
getConvertedVelocity,
kilometersToMiles
milesToKilometers
} from '$lib/units';
import { CalendarDate, type DateValue } from '@internationalized/date';
import { CalendarClock, CirclePlay, CircleStop, CircleX, Timer, Zap } from 'lucide-svelte';
@@ -128,7 +128,7 @@
speedValue = distancePerHourToSecondsPerDistance(speed);
}
if ($distanceUnits === 'imperial') {
speedValue = kilometersToMiles(speedValue);
speedValue = milesToKilometers(speedValue);
}
return speedValue;
}