mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-01-20 16:49:46 -06:00
update monitor details header
This commit is contained in:
@@ -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