mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
chore: Fix the loading state when updating roles twice in a row (#37438)
Fix the loading state when updating roles twice in a row.
This commit is contained in:
1 parent
0620e2df8f
commit
29f5fde08c
1 file changed
+6
-3
+6
-3
@@ -90,10 +90,11 @@ export const UpdateRolesConfirmationModal = ({
|
||||
})
|
||||
toast.success(`Successfully updated role for ${member.username}`)
|
||||
onClose(true)
|
||||
return
|
||||
} catch (error: any) {
|
||||
toast.error(`Failed to update role: ${error.message}`)
|
||||
} finally {
|
||||
setSaving(false)
|
||||
return toast.error(`Failed to update role: ${error.message}`)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,8 +131,10 @@ export const UpdateRolesConfirmationModal = ({
|
||||
toast.success(`Successfully updated role for ${member.username}`)
|
||||
onClose(true)
|
||||
} catch (error: any) {
|
||||
toast.error(`Failed to update role: ${error.message}`)
|
||||
} finally {
|
||||
setSaving(false)
|
||||
return toast.error(`Failed to update role: ${error.message}`)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user