fix: removing code duplication
This commit is contained in:
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"
|
||||
|
||||
Reference in new issue
Block a user