style: run prettier
All checks were successful
TrafficCue CI / check (push) Successful in 1m34s
TrafficCue CI / build (push) Successful in 10m30s
TrafficCue CI / build-android (push) Successful in 26m47s

This commit is contained in:
2025-10-21 15:46:50 +02:00
parent 4036790a4b
commit 372b31876d
17 changed files with 306 additions and 167 deletions

View File

@ -35,13 +35,15 @@ export const location = $state({
lastUpdate: null as Date | null,
});
const _isDriving = $derived(location.speed > (7 / 3.6));
const _isDriving = $derived(location.speed > 7 / 3.6);
export function isDriving() {
return _isDriving;
}
const roadMetadata: WrappedValue<GeoJSON.GeoJsonProperties> = $state({ current: null });
const roadMetadata: WrappedValue<GeoJSON.GeoJsonProperties> = $state({
current: null,
});
export function getRoadMetadata() {
return roadMetadata;
@ -60,8 +62,11 @@ export function watchLocation() {
location.available = true;
location.heading = pos.coords.heading;
location.lastUpdate = new Date();
getMeta({ lat: location.lat, lon: location.lng }, "transportation").then((meta) => {
getMeta(
{ lat: location.lat, lon: location.lng },
"transportation",
).then((meta) => {
roadMetadata.current = meta;
});