Merge pull request #2473 from deepanshu2711/fix/floating-strings-2470
fix(ui): shorten URL label and resize notification button (#2470)
This commit is contained in:
3 files changed
+13
-3
No files matched your search
@@ -5,3 +5,11 @@ export const safelyParseFloat = (value) => {
|
||||
}
|
||||
return parsedValue;
|
||||
};
|
||||
|
||||
export const formatMonitorUrl = (url, maxLength = 55) => {
|
||||
if (!url) return "";
|
||||
const strippedUrl = url.replace(/^https?:\/\//, "");
|
||||
return strippedUrl.length > maxLength
|
||||
? `${strippedUrl.slice(0, maxLength)}…`
|
||||
: strippedUrl;
|
||||
};
|
||||
Reference in new issue
Block a user