mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-17 15:03:07 +00:00
17 lines
446 B
TypeScript
17 lines
446 B
TypeScript
import { SectionType } from './initial-menus-state';
|
|
|
|
const menuSectionTypeComponentMap = new Map();
|
|
|
|
export function rendersSectionForType(type: SectionType) {
|
|
return function decorator(sectionComponent: any) {
|
|
if (!sectionComponent) {
|
|
return;
|
|
}
|
|
menuSectionTypeComponentMap.set(type, sectionComponent);
|
|
};
|
|
}
|
|
|
|
export function getComponentForSectionType(type: SectionType) {
|
|
return menuSectionTypeComponentMap.get(type);
|
|
}
|