From 1187f9d4cc9628354648b8dd983e7aa1f24cb66c Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Fri, 20 Jun 2025 10:08:13 +0800 Subject: [PATCH] add fix button loading state --- client/src/Hooks/useNotifications.js | 2 +- client/src/Pages/Notifications/create/index.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/Hooks/useNotifications.js b/client/src/Hooks/useNotifications.js index 69e03fd5e..cc6c3e875 100644 --- a/client/src/Hooks/useNotifications.js +++ b/client/src/Hooks/useNotifications.js @@ -161,7 +161,7 @@ const useTestNotification = () => { } catch (error) { setError(error); createToast({ - body: t("notifications.test.failed"), + body: error?.response?.data?.msg || t("notifications.test.failed"), }); } finally { setIsLoading(false); diff --git a/client/src/Pages/Notifications/create/index.jsx b/client/src/Pages/Notifications/create/index.jsx index fba30185f..0fb6cce08 100644 --- a/client/src/Pages/Notifications/create/index.jsx +++ b/client/src/Pages/Notifications/create/index.jsx @@ -204,7 +204,7 @@ const CreateNotifications = () => { spacing={theme.spacing(2)} >