fix(frontend): Stop loading button after invitation failure
This commit is contained in:
@@ -56,9 +56,12 @@ watch(open, (val) => {
|
||||
|
||||
async function handleSubmit() {
|
||||
loading.value = true
|
||||
await inviteMember(form.value.email, form.value.role as 'member' | 'admin')
|
||||
loading.value = false
|
||||
open.value = false
|
||||
useToast().add({ title: 'Invitation sent', color: 'success' })
|
||||
try {
|
||||
await inviteMember(form.value.email, form.value.role as 'member' | 'admin')
|
||||
open.value = false
|
||||
useToast().add({ title: 'Invitation sent', color: 'success' })
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user