Skip to content

Commit

Permalink
pass the config at the package
Browse files Browse the repository at this point in the history
  • Loading branch information
lucyjemutai committed Jul 4, 2024
1 parent 8873b45 commit ee940b0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
import React from 'react';
import { TabsComponent } from '@ohri/openmrs-esm-ohri-commons-lib';
import { useConfig } from '@openmrs/esm-framework';
import cacxConfigSchema from './cacx-config.json';

interface OverviewListProps {
patientUuid: string;
}

const CaCxCervicalCancerServices: React.FC<OverviewListProps> = ({ patientUuid }) => {
return <TabsComponent patientUuid={patientUuid} configSchema={cacxConfigSchema} />;
const config = useConfig();

return <TabsComponent patientUuid={patientUuid} configSchema={cacxConfigSchema} config={config} />;
};

export default CaCxCervicalCancerServices;
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import React from 'react';
import { Tabs, Tab, TabList, TabPanels, TabPanel } from '@carbon/react';
import { useConfig } from '@openmrs/esm-framework';
import { EncounterList, getMenuItemTabConfiguration } from '@ohri/openmrs-esm-ohri-commons-lib';
import styles from './encounter-list-tabs.scss';

interface TabsComponentProps {
patientUuid: string;
configSchema: any;
config: any;
}

export const TabsComponent: React.FC<TabsComponentProps> = ({ patientUuid, configSchema }) => {
const config = useConfig();
export const TabsComponent: React.FC<TabsComponentProps> = ({ patientUuid, configSchema, config }) => {
const tabsConfig = getMenuItemTabConfiguration(configSchema, config);

return (
Expand Down

0 comments on commit ee940b0

Please sign in to comment.