fix: removing code duplication

This commit is contained in:
Amol committed 2025-07-01 22:57:28 +05:30
1 parent 2e869310b8
commit 0e8a71c760
1 file changed
+1 -18
@@ -74,14 +74,13 @@ const MonitorDetailsControlHeader = ({
: ""
}
>
{isTestNotificationsDisabled ? (
<span>
<Button
variant="contained"
color="secondary"
loading={isSending}
startIcon={<EmailIcon />}
disabled
disabled={isTestNotificationsDisabled}
onClick={() => {
testAllNotifications({ monitorId: monitor?._id });
}}
@@ -92,22 +91,6 @@ const MonitorDetailsControlHeader = ({
{t("sendTestNotifications")}
</Button>
</span>
) : (
<Button
variant="contained"
color="secondary"
loading={isSending}
startIcon={<EmailIcon />}
onClick={() => {
testAllNotifications({ monitorId: monitor?._id });
}}
sx={{
whiteSpace: "nowrap",
}}
>
{t("sendTestNotifications")}
</Button>
)}
</Tooltip>
<Button
variant="contained"