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

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

View File

@@ -1,5 +1,5 @@
import { useState } from "react";
import { networkService } from "../main"; // Your network service
import { networkService } from "../main";
export const useBulkMonitors = () => {
const [isLoading, setIsLoading] = useState(false);
@@ -25,5 +25,5 @@ export const useBulkMonitors = () => {
}
};
return { createBulkMonitors, isLoading, error };
return [createBulkMonitors, isLoading, error];
};

View File

@@ -26,7 +26,7 @@ const BulkImport = () => {
{ name: t("bulkImport.title"), path: `/uptime/bulk-import` },
];
const { createBulkMonitors, isLoading: hookLoading, error } = useBulkMonitors();
const [createBulkMonitors, hookLoading, error] = useBulkMonitors();
const handleSubmit = async () => {
if (!selectedFile) {