fix(frontend): Stop loading button after invitation failure

This commit is contained in:
2025-05-01 17:46:41 +02:00
parent 06c3bec558
commit 2771c71253

View File

@@ -56,9 +56,12 @@ watch(open, (val) => {
async function handleSubmit() { async function handleSubmit() {
loading.value = true loading.value = true
await inviteMember(form.value.email, form.value.role as 'member' | 'admin') try {
loading.value = false await inviteMember(form.value.email, form.value.role as 'member' | 'admin')
open.value = false open.value = false
useToast().add({ title: 'Invitation sent', color: 'success' }) useToast().add({ title: 'Invitation sent', color: 'success' })
} finally {
loading.value = false
}
} }
</script> </script>