team-1/frontend/src/routes/+page.svelte

22 lines
425 B
Svelte
Raw Normal View History

2025-08-01 18:07:11 +02:00
<script lang="ts">
2025-08-01 22:17:26 +02:00
import { onMount } from "svelte"
2025-08-01 18:07:11 +02:00
2025-08-01 22:17:26 +02:00
let pos = $state()
2025-08-01 21:10:03 +02:00
2025-08-01 22:17:26 +02:00
function onGPS(t: GeolocationPosition) {
pos = t.coords
}
function failGPS(t: GeolocationPositionError) {
console.log(t)
}
onMount(() => {
navigator.geolocation.getCurrentPosition(onGPS, failGPS)
})
2025-08-01 18:07:11 +02:00
</script>
2025-08-01 22:17:26 +02:00
<div class="flex h-full w-full items-center justify-center">
<div></div>
2025-08-01 21:10:03 +02:00
</div>