Skip to content

Commit fa32231

Browse files
Update apps/web/src/routes/_app/datahub/index.tsx
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent d79689b commit fa32231

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

apps/web/src/routes/_app/datahub/index.tsx

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,21 @@ const RouteComponent = () => {
102102
case 'JSON':
103103
return download(`${baseFilename}.json`, JSON.stringify(data, null, 2));
104104
}
105+
})
106+
.then(() => {
105107
addNotification({
106-
message: t({
107-
en: 'Export successful',
108-
fr: 'Exportation réussie'
109-
}),
108+
message: t({ en: 'Export successful', fr: 'Exportation réussie' }),
110109
type: 'success'
111110
});
112111
})
112+
.catch((err) => {
113+
console.error(err);
114+
addNotification({
115+
message: t({ en: 'Export failed', fr: "Échec de l'exportation" }),
116+
type: 'error'
117+
});
118+
});
119+
})
113120
.catch(console.error);
114121
};
115122

0 commit comments

Comments
 (0)