fix(frontend): race condition in label create dialog

This commit is contained in:
aaldebs99 2025-12-12 02:19:42 +00:00
parent 18072b615b
commit 5cfa8748d5
1 changed files with 3 additions and 1 deletions

View File

@ -130,7 +130,9 @@ const LabelCreateDialog: React.FC<LabelCreateDialogProps> = ({
background_color: formData.background_color || undefined,
icon: formData.icon || undefined,
});
handleClose();
// Call onClose directly after successful submission
// Don't use handleClose() here to avoid race conditions with loading state
onClose();
} catch (error) {
console.error('Failed to save label:', error);
// Could add error handling UI here