Skip to content

Commit

Permalink
remove usage of useQuery and replaced the prop with existing data
Browse files Browse the repository at this point in the history
  • Loading branch information
sriharsh05 committed Oct 28, 2023
1 parent d6889c6 commit d2daf7a
Showing 1 changed file with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"));

Expand Down Expand Up @@ -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 (
<div className="flex flex-col gap-2">
{!props.consultationData.discharge_date &&
Expand All @@ -120,7 +113,10 @@ export const ConsultationUpdatesTab = (props: ConsultationTabProps) => {
<div className="mx-auto flex w-full flex-col justify-between gap-1 rounded bg-[#020617] lg:w-auto lg:min-w-[1280px] lg:flex-row">
<div className="min-h-[400px] flex-1">
<HL7PatientVitalsMonitor
patientCurrentBedAssignmentDate={bedAssignmentStartDate}
patientCurrentBedAssignmentDate={
props.patientData?.last_consultation?.current_bed
?.start_date
}
patientAssetBed={{
asset: monitorBedData?.asset_object as AssetData,
bed: monitorBedData?.bed_object as BedModel,
Expand Down

0 comments on commit d2daf7a

Please sign in to comment.