chore: fix formatting

This commit is contained in:
Deepanshu committed 2025-06-17 10:57:30 +05:30
1 parent df42932e0c
commit e818f1cd61
2 files changed
+10 -6

No files matched your search

@@ -69,7 +69,7 @@ const MonitorDetailsControlHeader = ({
testAllNotifications({ monitorId: monitor?._id }); testAllNotifications({ monitorId: monitor?._id });
}} }}
sx={{ sx={{
whiteSpace: 'nowrap', whiteSpace: "nowrap",
}} }}
> >
{t("sendTestNotifications")} {t("sendTestNotifications")}
@@ -23,6 +23,7 @@ import { useMonitorUtils } from "../../Hooks/useMonitorUtils";
const Status = ({ monitor }) => { const Status = ({ monitor }) => {
const theme = useTheme(); const theme = useTheme();
const { statusColor, determineState } = useMonitorUtils(); const { statusColor, determineState } = useMonitorUtils();
const URL_TRUNCATION_LENGTH = 55;
return ( return (
<Stack> <Stack>
@@ -33,12 +34,15 @@ const Status = ({ monitor }) => {
gap={theme.spacing(4)} gap={theme.spacing(4)}
> >
<PulseDot color={statusColor[determineState(monitor)]} /> <PulseDot color={statusColor[determineState(monitor)]} />
<Typography variant="monitorUrl" noWrap> <Typography
{monitor?.url ? ( variant="monitorUrl"
monitor.url?.length > 55 noWrap
? `${monitor.url.replace(/^https?:\/\//, "")?.slice(0, 55)}…` >
{monitor?.url
? monitor.url?.length > URL_TRUNCATION_LENGTH
? `${monitor.url.replace(/^https?:\/\//, "")?.slice(0, URL_TRUNCATION_LENGTH)}…`
: monitor.url.replace(/^https?:\/\//, "") : monitor.url.replace(/^https?:\/\//, "")
) : "…"} : "…"}
</Typography> </Typography>
<Dot /> <Dot />
<Typography> <Typography>