diff --git a/client/src/Components/MonitorDetailsControlHeader/index.jsx b/client/src/Components/MonitorDetailsControlHeader/index.jsx
index 8c9f845e9..d569ec840 100644
--- a/client/src/Components/MonitorDetailsControlHeader/index.jsx
+++ b/client/src/Components/MonitorDetailsControlHeader/index.jsx
@@ -14,6 +14,7 @@ import { useTheme } from "@mui/material/styles";
import { usePauseMonitor } from "../../Hooks/monitorHooks";
import { useSendTestEmail } from "../../Hooks/useSendTestEmail";
import { useTranslation } from "react-i18next";
+import { useTestAllNotifications } from "../../Hooks/useNotifications";
/**
* MonitorDetailsControlHeader component displays the control header for monitor details.
* It includes status display, pause/resume button, and a configure button for admins.
@@ -39,7 +40,10 @@ const MonitorDetailsControlHeader = ({
const { t } = useTranslation();
const [pauseMonitor, isPausing, error] = usePauseMonitor();
- const [isSending, emailError, sendTestEmail] = useSendTestEmail();
+ // const [isSending, emailError, sendTestEmail] = useSendTestEmail();
+
+ const [testAllNotifications, isSending, errorAllNotifications] =
+ useTestAllNotifications();
if (isLoading) {
return ;
@@ -62,10 +66,10 @@ const MonitorDetailsControlHeader = ({
loading={isSending}
startIcon={}
onClick={() => {
- sendTestEmail();
+ testAllNotifications({ monitorId: monitor?._id });
}}
>
- {t("sendTestEmail")}
+ {t("sendTestNotifications")}