update monitor details header
This commit is contained in:
1 parent
6f133ed7a0
commit
9bba8440ca
1 file changed
+7
-3
@@ -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 <Skeleton />;
|
||||
@@ -62,10 +66,10 @@ const MonitorDetailsControlHeader = ({
|
||||
loading={isSending}
|
||||
startIcon={<EmailIcon />}
|
||||
onClick={() => {
|
||||
sendTestEmail();
|
||||
testAllNotifications({ monitorId: monitor?._id });
|
||||
}}
|
||||
>
|
||||
{t("sendTestEmail")}
|
||||
{t("sendTestNotifications")}
|
||||
</Button>
|
||||
<Button
|
||||
variant="contained"
|
||||
|
||||
Reference in new issue
Block a user