Files
TLA/resources/js/pages/HomeView.vue
T
Belupeti 4b2df8f9bd
Build / Build-image (push) Failing after 7s
some frontend
2026-08-09 19:48:30 +02:00

53 lines
1.0 KiB
Vue

<script lang="ts">
import vue from '@vitejs/plugin-vue';
import type { FormSubmitEvent } from '@nuxt/ui';
import axios from 'axios';
export default {
data() {
return {
hint: '',
guesses: [],
};
},
mounted () {
axios
.get('/api/fetch_tla/en')
.then(response => {
this.hint = response.data.hint;
this.guesses = response.data.guesses;
});
}
}
async function onSubmit(event: FormSubmitEvent<Schema>) {
console.log(event.data)
}
</script>
<template>
<UCard>
<template #header>
{{ this.hint }}
</template>
<template v-for="guess in guesses">
{{ guess }}
</template>
<template #footer>
<UForm :schema="schema" :state="state" class="space-y-4" @submit="onSubmit">
<UInput
placeholder="Three Letter Abbreviation"
/>
<UButton type="submit">
Submit
</UButton>
</UForm>
</template>
</UCard>
</template>