mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-05-09 11:09:35 -05:00
chore: remove URL_TRUNCATE_LENGTH from component
This commit is contained in:
@@ -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)}.
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user