diff --git a/src/app/event-setup/components/import-participants-dialog.tsx b/src/app/event-setup/components/import-participants-dialog.tsx index 2e05e80..04303cc 100644 --- a/src/app/event-setup/components/import-participants-dialog.tsx +++ b/src/app/event-setup/components/import-participants-dialog.tsx @@ -28,6 +28,7 @@ export default function ImportParticipantsDialog() { setLoading(true); if (parsedAttendees.length === 0) { toast.error("No attendees to import"); + setImportDialog(false); return; } @@ -44,6 +45,7 @@ export default function ImportParticipantsDialog() { ); } catch (err: any) { toast.error(err.message); + setImportDialog(false); } }); @@ -52,10 +54,13 @@ export default function ImportParticipantsDialog() { }, 500); toast.success("Certificates added"); + setImportDialog(false); } catch (err: any) { toast.error(err.message); + setImportDialog(false); } setLoading(false); + setImportDialog(false); }; const cancelImport = () => { diff --git a/src/app/event-setup/components/xlsx-form.tsx b/src/app/event-setup/components/xlsx-form.tsx index 0f88b44..493852d 100644 --- a/src/app/event-setup/components/xlsx-form.tsx +++ b/src/app/event-setup/components/xlsx-form.tsx @@ -53,7 +53,7 @@ export function XlsxForm() { _parsedAttendees.forEach((m, i) => { const data = schema.safeParse(m); if (!data.success) { - toast.error("Contains invalid data"); + toast.error("Contains invalid data, please check the format"); console.log(i, data.error, m); invalid = true; return;