Added code version (huge payload, needs api)

This commit is contained in:
Alexis
2023-04-25 17:22:21 +02:00
parent 4c8c005bdd
commit 73a4ca7982
9 changed files with 2921 additions and 6 deletions

View File

@@ -1,7 +1,32 @@
<script lang="ts" setup></script>
<script lang="ts" setup>
import { useCirStore } from "@/stores/cir";
import { useGeolocation } from "@vueuse/core";
import { ref } from "vue";
const { coords } = useGeolocation();
const { geoData, getCounty } = useCirStore();
const currentCountyCode = ref<string | null>("");
function handleGeolocClick() {
currentCountyCode.value = getCounty(
coords.value.longitude,
coords.value.latitude
);
}
</script>
<template>
<div>
<main class="container py-4">Main</main>
<main class="container py-4">
<button
v-if="geoData.isReady"
class="py-2 px-4 rounded-sm bg-white text-sm text-slate-950"
@click="handleGeolocClick"
>
Get Code
</button>
{{ currentCountyCode }}
</main>
</div>
</template>