From d2daf7ae557b4628f94d5036f9a9a750668cbbae Mon Sep 17 00:00:00 2001 From: sriharsh05 Date: Sat, 28 Oct 2023 22:19:32 +0530 Subject: [PATCH] remove usage of useQuery and replaced the prop with existing data --- .../ConsultationDetails/ConsultationUpdatesTab.tsx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx b/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx index e9f91fd21e4..4b3b5527bb8 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx +++ b/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx @@ -13,8 +13,6 @@ import Chip from "../../../CAREUI/display/Chip"; import { formatAge, formatDate, formatDateTime } from "../../../Utils/utils"; import ReadMore from "../../Common/components/Readmore"; import { DailyRoundsList } from "../Consultations/DailyRoundsList"; -import useQuery from "../../../Utils/request/useQuery"; -import routes from "../../../Redux/api"; const PageTitle = lazy(() => import("../../Common/PageTitle")); @@ -106,11 +104,6 @@ export const ConsultationUpdatesTab = (props: ConsultationTabProps) => { fetchData(); }, [props.consultationData]); - const { data } = useQuery(routes.listConsultationBeds, { - query: { consultation: props.consultationId }, - }); - const bedAssignmentStartDate = data?.results[0].created_date ?? ""; - return (
{!props.consultationData.discharge_date && @@ -120,7 +113,10 @@ export const ConsultationUpdatesTab = (props: ConsultationTabProps) => {