Replaced the object destructing with array as it is a standard pratice.

This commit is contained in:
Owaise Imdad committed 2025-04-30 23:52:17 +05:30
1 parent 59027cf33c
commit 8a53ddcf15
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -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];
}; };
+1 -1
View File
@@ -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) {