Skip to content

Commit

Permalink
add depedency in use effect
Browse files Browse the repository at this point in the history
  • Loading branch information
kb019 committed Oct 11, 2024
1 parent 6d5dfdf commit e443150
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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, <PatientWorkspaceTitle patient={patient} />);
}, []);
setTitle(patient.person.display, <PatientWorkspaceTitle key={patient.uuid} patient={patient} />);
}, [patient.uuid]);

return (
<div className={styles.workspaceContainer}>
Expand Down

0 comments on commit e443150

Please sign in to comment.