Skip to content

Commit

Permalink
Remove scroll bar when header text overflows in patient details. (#6910)
Browse files Browse the repository at this point in the history
* remove scroll bar

* add key to div
  • Loading branch information
AshrafMd-1 authored Jan 4, 2024
1 parent 15fd7fe commit f8a979b
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions src/Components/Patient/PatientHome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -311,20 +311,18 @@ export const PatientHome = (props: any) => {
patientData.medical_history.length
) {
const medHis = patientData.medical_history;
patientMedHis = medHis.map((item: any, idx: number) => (
<div className="sm:col-span-1" key={`med_his_${idx}`}>
{item?.disease !== "NO" && (
<>
<div className="overflow-x-scroll text-sm font-semibold leading-5 text-zinc-400">
{item.disease}
</div>
<div className="mt-1 overflow-x-scroll whitespace-normal break-words text-sm font-medium leading-5">
{item.details}
</div>
</>
)}
</div>
));
patientMedHis = medHis
.filter((item) => item.disease !== "NO")
.map((item, idx) => (
<div className="sm:col-span-1" key={`med_his_${idx}`}>
<div className="break-words text-sm font-semibold leading-5 text-zinc-400">
{item.disease}
</div>
<div className="mt-1 whitespace-normal break-words text-sm font-medium leading-5">
{item.details}
</div>
</div>
));
}

let consultationList, sampleList;
Expand Down

0 comments on commit f8a979b

Please sign in to comment.