From e443150c6c860f31671d64b04face349368384a7 Mon Sep 17 00:00:00 2001 From: Bhargav Kodali Date: Thu, 10 Oct 2024 21:21:20 -0700 Subject: [PATCH] add depedency in use effect --- .../ward-workspace/patient-details/ward-patient.workspace.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/esm-ward-app/src/ward-workspace/patient-details/ward-patient.workspace.tsx b/packages/esm-ward-app/src/ward-workspace/patient-details/ward-patient.workspace.tsx index efcaa41aa..cfd9e51ee 100644 --- a/packages/esm-ward-app/src/ward-workspace/patient-details/ward-patient.workspace.tsx +++ b/packages/esm-ward-app/src/ward-workspace/patient-details/ward-patient.workspace.tsx @@ -9,8 +9,8 @@ attach('ward-patient-workspace-header-slot', 'patient-vitals-info'); export default function WardPatientWorkspace({ setTitle, wardPatient: { patient } }: WardPatientWorkspaceProps) { useEffect(() => { - setTitle(patient.person.display, ); - }, []); + setTitle(patient.person.display, ); + }, [patient.uuid]); return (