Refactor ImportICSModal to ensure onClose is called after event creation
This commit is contained in:
parent
ded3a9d218
commit
58d5c3ef9e
1 changed files with 1 additions and 2 deletions
|
|
@ -153,11 +153,10 @@ export const ImportICSModal = ({ onClose }: ImportICSModalProps) => {
|
|||
},
|
||||
{ timeout: 4000 }
|
||||
);
|
||||
|
||||
onClose();
|
||||
} else {
|
||||
await createEvents(eventsToInsert);
|
||||
}
|
||||
onClose();
|
||||
} catch (error) {
|
||||
console.error("Error importing events:", error);
|
||||
toast.add(
|
||||
|
|
|
|||
Loading…
Reference in a new issue