diff --git a/src/components/Facility/ConsultationDetails/index.tsx b/src/components/Facility/ConsultationDetails/index.tsx index ec26dfe1a1d..463a4037fc9 100644 --- a/src/components/Facility/ConsultationDetails/index.tsx +++ b/src/components/Facility/ConsultationDetails/index.tsx @@ -72,15 +72,12 @@ const defaultTabs = { export const ConsultationDetails = (props: any) => { const { facilityId, patientId, consultationId } = props; const { t } = useTranslation(); - const [tabs, setTabs] = - useState>>(defaultTabs); const pluginTabs = useCareAppConsultationTabs(); - useEffect(() => { - if (pluginTabs) { - setTabs((prev) => ({ ...prev, ...pluginTabs })); - } - }, [pluginTabs]); + const tabs: Record> = { + ...defaultTabs, + ...pluginTabs, + }; let tab = undefined; if (Object.keys(tabs).includes(props.tab.toUpperCase())) {