Skip to content

Commit

Permalink
Merge branch 'develop' into issue/8006/TypeError_in_NotificationsList…
Browse files Browse the repository at this point in the history
…_Component
  • Loading branch information
AdityaJ2305 authored Nov 13, 2024
2 parents 94377df + 7acc8be commit 2500355
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/components/Facility/ConsultationDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,12 @@ const defaultTabs = {
export const ConsultationDetails = (props: any) => {
const { facilityId, patientId, consultationId } = props;
const { t } = useTranslation();
const [tabs, setTabs] =
useState<Record<string, React.FC<ConsultationTabProps>>>(defaultTabs);
const pluginTabs = useCareAppConsultationTabs();

useEffect(() => {
if (pluginTabs) {
setTabs((prev) => ({ ...prev, ...pluginTabs }));
}
}, [pluginTabs]);
const tabs: Record<string, React.FC<ConsultationTabProps>> = {
...defaultTabs,
...pluginTabs,
};

let tab = undefined;
if (Object.keys(tabs).includes(props.tab.toUpperCase())) {
Expand Down

0 comments on commit 2500355

Please sign in to comment.