chore: remove URL_TRUNCATE_LENGTH from component

This commit is contained in:
Deepanshu
2025-06-18 11:09:23 +05:30
parent 75309fc53c
commit 6b3773ed76
2 changed files with 2 additions and 5 deletions
@@ -24,7 +24,6 @@ import { formatMonitorUrl } from "../../Utils/utils";
const Status = ({ monitor }) => {
const theme = useTheme();
const { statusColor, determineState } = useMonitorUtils();
const URL_TRUNCATION_LENGTH = 55;
return (
<Stack>
@@ -35,9 +34,7 @@ const Status = ({ monitor }) => {
gap={theme.spacing(4)}
>
<PulseDot color={statusColor[determineState(monitor)]} />
<Typography variant="monitorUrl">
{formatMonitorUrl(monitor?.url, URL_TRUNCATION_LENGTH)}
</Typography>
<Typography variant="monitorUrl">{formatMonitorUrl(monitor?.url)}</Typography>
<Dot />
<Typography>
Checking every {formatDurationRounded(monitor?.interval)}.
+1 -1
View File
@@ -6,7 +6,7 @@ export const safelyParseFloat = (value) => {
return parsedValue;
};
export const formatMonitorUrl = (url, maxLength = 50) => {
export const formatMonitorUrl = (url, maxLength = 55) => {
if (!url) return "";
const strippedUrl = url.replace(/^https?:\/\//, "");
return strippedUrl.length > maxLength