@ugandaemr/esm-patient-queues-app
Version:
Patient queues microfrontend for UgandaEMR
11 lines (7 loc) • 393 B
text/typescript
import { createGlobalStore, createUseStore } from '@openmrs/esm-framework';
const navGroupStore = createGlobalStore('outpatient-nav-groups', { navGroups: [] });
export function registerNavGroup(slotName: string) {
const store = navGroupStore.getState();
navGroupStore.setState({ navGroups: [slotName, ...store.navGroups] });
}
export const useNavGroups = createUseStore(navGroupStore);