[Uptime]: Used latest formatting rules
This commit is contained in:
1 parent
157343d152
commit
d3493a0af6
1 file changed
+4
-5
@@ -43,7 +43,6 @@ import {
|
||||
usePauseMonitor,
|
||||
useFetchMonitorById,
|
||||
} from "../../../Hooks/monitorHooks";
|
||||
import { useCreateMonitor } from "../../../Hooks/monitorHooks";
|
||||
|
||||
/**
|
||||
* Parses a URL string and returns a URL object.
|
||||
@@ -105,10 +104,6 @@ const UptimeCreate = () => {
|
||||
// Setup
|
||||
const theme = useTheme();
|
||||
const { t } = useTranslation();
|
||||
const formatAndSet = (monitor) => {
|
||||
monitor.interval = monitor.interval / MS_PER_MINUTE;
|
||||
setMonitor(monitor);
|
||||
};
|
||||
|
||||
// Constants
|
||||
const MS_PER_MINUTE = 60000;
|
||||
@@ -160,6 +155,10 @@ const UptimeCreate = () => {
|
||||
namePlaceholder: t("monitorType.port.namePlaceholder"),
|
||||
},
|
||||
};
|
||||
const formatAndSet = (monitor) => {
|
||||
monitor.interval = monitor.interval / MS_PER_MINUTE;
|
||||
setMonitor(monitor);
|
||||
};
|
||||
|
||||
// Handlers
|
||||
const onSubmit = async (event) => {
|
||||
|
||||
Reference in new issue
Block a user