team-1/frontend/src/routes/+page.svelte
2025-08-01 22:17:26 +02:00

21 lines
425 B
Svelte

<script lang="ts">
import { onMount } from "svelte"
let pos = $state()
function onGPS(t: GeolocationPosition) {
pos = t.coords
}
function failGPS(t: GeolocationPositionError) {
console.log(t)
}
onMount(() => {
navigator.geolocation.getCurrentPosition(onGPS, failGPS)
})
</script>
<div class="flex h-full w-full items-center justify-center">
<div></div>
</div>