fix: disable button when marker is not present
All checks were successful
deploy to cloudflare pages / deploy (push) Successful in 37s

This commit is contained in:
uku 2024-10-24 12:14:35 +02:00
parent ab2c93e71b
commit 4b953ba898
Signed by: uku
SSH key fingerprint: SHA256:4P0aN6M8ajKukNi6aPOaX0LacanGYtlfjmN+m/sHY/o

View file

@ -88,9 +88,11 @@
</script>
<div class="container">
<span class="title">{data.gameData.stopName}</span>
<h1>{data.gameData.stopName}</h1>
<div hidden={submitted}><button onclick={checkLocation}>SUBMIT</button></div>
<div hidden={submitted}>
<button onclick={checkLocation} disabled={latlng.lat === 0 || latlng.lng === 0}>SUBMIT</button>
</div>
<div class="results" hidden={!submitted}>
{Math.floor(points)} points! Vous etiez à {Math.floor(distance)}m.
@ -117,11 +119,6 @@
text-align: center;
}
.title {
font-weight: bold;
font-size: 32px;
}
.results {
color: green;
font-size: 20px;