From 33ae347992b7185640018f7e6cce8739f027e2b6 Mon Sep 17 00:00:00 2001 From: Saikiran Patil <84263946+saikiranpatil@users.noreply.github.com> Date: Mon, 16 Dec 2024 13:37:39 +0530 Subject: [PATCH] updated useQuery --- src/components/Facility/LocationManagement.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/Facility/LocationManagement.tsx b/src/components/Facility/LocationManagement.tsx index 4e6e77c0a3f..1fe0551b4d3 100644 --- a/src/components/Facility/LocationManagement.tsx +++ b/src/components/Facility/LocationManagement.tsx @@ -4,6 +4,8 @@ import RecordMeta from "@/CAREUI/display/RecordMeta"; import CareIcon from "@/CAREUI/icons/CareIcon"; import PaginatedList from "@/CAREUI/misc/PaginatedList"; +import { Badge } from "@/components/ui/badge"; + import ButtonV2, { Cancel } from "@/components/Common/ButtonV2"; import ConfirmDialog from "@/components/Common/ConfirmDialog"; import DialogModal from "@/components/Common/Dialog"; @@ -20,8 +22,6 @@ import routes from "@/Utils/request/api"; import request from "@/Utils/request/request"; import useTanStackQueryInstead from "@/Utils/request/useQuery"; -import { Badge } from "../ui/badge"; - interface Props { facilityId: string; } @@ -49,7 +49,7 @@ export default function LocationManagement({ facilityId }: Props) { string | undefined >(undefined); - useQuery(routes.getPermittedFacility, { + useTanStackQueryInstead(routes.getPermittedFacility, { pathParams: { id: facilityId }, onResponse: (res) => { if (res.data) {