diff --git a/src/Components/Facility/ConsultationDetails/Events/GenericEvent.tsx b/src/Components/Facility/ConsultationDetails/Events/GenericEvent.tsx index 80aa0f86ef7..1fd0724ed8c 100644 --- a/src/Components/Facility/ConsultationDetails/Events/GenericEvent.tsx +++ b/src/Components/Facility/ConsultationDetails/Events/GenericEvent.tsx @@ -9,7 +9,7 @@ interface IProps { * object - array, date */ const formatValue = (value: unknown, key?: string): ReactNode => { - if (value == null || value == "N/A") { + if (value == null || value === "N/A") { return null; } @@ -50,8 +50,8 @@ const formatValue = (value: unknown, key?: string): ReactNode => { return ( ); @@ -69,8 +69,8 @@ const formatValue = (value: unknown, key?: string): ReactNode => { return `No ${key?.replaceAll(/_/g, " ")}`; } - return entries.map(([key, value]) => ( -
+ return entries.map(([key, value], idx) => ( +
{key.replaceAll(/_/g, " ")} @@ -96,7 +96,7 @@ export default function GenericEvent(props: IProps) { {t(key).replaceAll(/_/g, " ")} - + {value}