From 2fe3b2d043e06cd6034a68709a39757625a35a46 Mon Sep 17 00:00:00 2001 From: Gampa Sri Harsh <114745442+sriharsh05@users.noreply.github.com> Date: Wed, 31 Jan 2024 13:11:15 +0530 Subject: [PATCH] Fixed close Button in Treatment Summary (#7001) * fix close Button in Treatment Summary * replace navigate with goBack from appHistory for close button --- src/Components/Facility/TreatmentSummary.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Components/Facility/TreatmentSummary.tsx b/src/Components/Facility/TreatmentSummary.tsx index 8f1589cdf6f..f41f540a12d 100644 --- a/src/Components/Facility/TreatmentSummary.tsx +++ b/src/Components/Facility/TreatmentSummary.tsx @@ -11,6 +11,8 @@ import { PatientModel } from "../Patient/models"; import { GENDER_TYPES } from "../../Common/constants"; import { formatAge, formatDate, formatDateTime } from "../../Utils/utils"; +import useSlug from "../../Common/hooks/useSlug"; +import useAppHistory from "../../Common/hooks/useAppHistory"; const Loading = lazy(() => import("../Common/Loading")); @@ -25,6 +27,9 @@ const TreatmentSummary = (props: any) => { const [isLoading, setIsLoading] = useState(false); const [investigations, setInvestigations] = useState>([]); const [dailyRounds, setDailyRounds] = useState({}); + const facilityId = useSlug("facility"); + const { goBack } = useAppHistory(); + const url = `/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}`; const fetchPatientData = useCallback( async (status: statusType) => { @@ -104,10 +109,7 @@ const TreatmentSummary = (props: any) => { > Print Treatment Summary -