[Uptime]: Used latest formatting rules

This commit is contained in:
Jesulayomy committed 2025-07-23 20:01:39 -04:00
1 parent 157343d152
commit d3493a0af6
1 file changed
+4 -5
+4 -5
View File
@@ -43,7 +43,6 @@ import {
usePauseMonitor, usePauseMonitor,
useFetchMonitorById, useFetchMonitorById,
} from "../../../Hooks/monitorHooks"; } from "../../../Hooks/monitorHooks";
import { useCreateMonitor } from "../../../Hooks/monitorHooks";
/** /**
* Parses a URL string and returns a URL object. * Parses a URL string and returns a URL object.
@@ -105,10 +104,6 @@ const UptimeCreate = () => {
// Setup // Setup
const theme = useTheme(); const theme = useTheme();
const { t } = useTranslation(); const { t } = useTranslation();
const formatAndSet = (monitor) => {
monitor.interval = monitor.interval / MS_PER_MINUTE;
setMonitor(monitor);
};
// Constants // Constants
const MS_PER_MINUTE = 60000; const MS_PER_MINUTE = 60000;
@@ -160,6 +155,10 @@ const UptimeCreate = () => {
namePlaceholder: t("monitorType.port.namePlaceholder"), namePlaceholder: t("monitorType.port.namePlaceholder"),
}, },
}; };
const formatAndSet = (monitor) => {
monitor.interval = monitor.interval / MS_PER_MINUTE;
setMonitor(monitor);
};
// Handlers // Handlers
const onSubmit = async (event) => { const onSubmit = async (event) => {