Fix: Minor Changes

This commit is contained in:
Br0wnHammer committed 2025-08-19 01:11:56 +05:30
1 parent f5a25bc0e5
commit 613fbf8c39
3 files changed
+8 -16

No files matched your search

+1 -15
View File
@@ -44,20 +44,6 @@ import {
useFetchMonitorGames,
} from "../../../Hooks/monitorHooks";
/**
* Parses a URL string and returns a URL object.
*
* @param {string} url - The URL string to parse.
* @returns {URL} - The parsed URL object if valid, otherwise an empty string.
*/
const parseUrl = (url) => {
try {
return new URL(url);
} catch (error) {
return null;
}
};
/**
* Create page renders monitor creation or configuration views.
* @component
@@ -299,7 +285,7 @@ const UptimeCreate = ({ isClone = false }) => {
const isBusy = isLoading || isCreating || isDeleting || isUpdating || isPausing;
const displayInterval = monitor?.interval / MS_PER_MINUTE || 1;
const parsedUrl = parseUrl(monitor?.url);
const parsedUrl = monitor?.url;
const protocol = parsedUrl?.protocol?.replace(":", "") || "";
useEffect(() => {