Skip to content

Commit

Permalink
refactor: code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
usamaidrsk committed May 27, 2024
1 parent 09f81b9 commit 2b235e0
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React, { useCallback, useEffect, useRef, useState } from 'react';
import classNames from 'classnames';
import {
displayName,
PatientBannerActionsMenu,
PatientBannerContactDetails,
PatientBannerPatientInfo,
PatientBannerToggleContactDetailsButton,
PatientPhoto,
displayName,
} from '@openmrs/esm-framework';
import styles from './patient-banner.scss';

Expand Down Expand Up @@ -45,7 +45,8 @@ const PatientBanner: React.FC<PatientBannerProps> = ({ patient, patientUuid, hid
const isDeceased = Boolean(patient?.deceasedDateTime);
// render details button below patient details for workspaces
// 520px is the maximum width a workspace occupies
const showDetailsButtonBelowHeader = patientBannerRef.current?.scrollWidth <= 520;
const workspaceWidth = 520;
const showDetailsButtonBelowHeader = patientBannerRef.current?.scrollWidth <= workspaceWidth;

return (
<header
Expand Down

0 comments on commit 2b235e0

Please sign in to comment.