fix(frontend): Stop loading button after invitation failure
This commit is contained in:
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user