Replaced the object destructing with array as it is a standard pratice.
This commit is contained in:
1 parent
59027cf33c
commit
8a53ddcf15
2 files changed
+3
-3
No files matched your search
@@ -1,5 +1,5 @@
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { networkService } from "../main"; // Your network service
|
import { networkService } from "../main";
|
||||||
|
|
||||||
export const useBulkMonitors = () => {
|
export const useBulkMonitors = () => {
|
||||||
const [isLoading, setIsLoading] = useState(false);
|
const [isLoading, setIsLoading] = useState(false);
|
||||||
@@ -25,5 +25,5 @@ export const useBulkMonitors = () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return { createBulkMonitors, isLoading, error };
|
return [createBulkMonitors, isLoading, error];
|
||||||
};
|
};
|
||||||
@@ -26,7 +26,7 @@ const BulkImport = () => {
|
|||||||
{ name: t("bulkImport.title"), path: `/uptime/bulk-import` },
|
{ name: t("bulkImport.title"), path: `/uptime/bulk-import` },
|
||||||
];
|
];
|
||||||
|
|
||||||
const { createBulkMonitors, isLoading: hookLoading, error } = useBulkMonitors();
|
const [createBulkMonitors, hookLoading, error] = useBulkMonitors();
|
||||||
|
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
if (!selectedFile) {
|
if (!selectedFile) {
|
||||||
|
|||||||
Reference in new issue
Block a user