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
+3 -20
@@ -74,30 +74,13 @@ const MonitorDetailsControlHeader = ({
: ""
}
>
{isTestNotificationsDisabled ? (
<span>
<Button
variant="contained"
color="secondary"
loading={isSending}
startIcon={<EmailIcon />}
disabled
onClick={() => {
testAllNotifications({ monitorId: monitor?._id });
}}
sx={{
whiteSpace: "nowrap",
}}
>
{t("sendTestNotifications")}
</Button>
</span>
) : (
<span>
<Button
variant="contained"
color="secondary"
loading={isSending}
startIcon={<EmailIcon />}
disabled={isTestNotificationsDisabled}
onClick={() => {
testAllNotifications({ monitorId: monitor?._id });
}}
@@ -107,7 +90,7 @@ const MonitorDetailsControlHeader = ({
>
{t("sendTestNotifications")}
</Button>
)}
</span>
</Tooltip>
<Button
variant="contained"