UNPKG

@ugandaemr/esm-patient-queues-app

Version:
11 lines (7 loc) 393 B
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);