address PR feedback

This commit is contained in:
Luis Sousa committed 2025-07-04 11:53:25 +01:00
1 parent d5262a1968
commit 292c7fd7ea
3 files changed
+12 -21

No files matched your search

+4 -2
View File
@@ -65,14 +65,16 @@ const useDeleteNotification = () => {
const [error, setError] = useState(null);
const { t } = useTranslation();
const deleteNotification = async (id, triggerUpdate) => {
const deleteNotification = async (id, callback) => {
try {
setIsLoading(true);
await networkService.deleteNotificationById({ id });
createToast({
body: t("notifications.delete.success"),
});
triggerUpdate();
if (callback) {
callback();
}
} catch (error) {
setError(error);
createToast({