|
|
@ -4,11 +4,11 @@ type SidebarItem = { |
|
|
|
i18nLabel: string; |
|
|
|
i18nLabel: string; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
export const createSidebarItems = (initialItems: SidebarItem[] = []): ({ |
|
|
|
export const createSidebarItems = (initialItems: SidebarItem[] = []): { |
|
|
|
registerSidebarItem: (item: SidebarItem) => void; |
|
|
|
registerSidebarItem: (item: SidebarItem) => void; |
|
|
|
unregisterSidebarItem: (i18nLabel: SidebarItem['i18nLabel']) => void; |
|
|
|
unregisterSidebarItem: (i18nLabel: SidebarItem['i18nLabel']) => void; |
|
|
|
itemsSubscription: Subscription<SidebarItem[]>; |
|
|
|
itemsSubscription: Subscription<SidebarItem[]>; |
|
|
|
}) => { |
|
|
|
} => { |
|
|
|
const items = initialItems; |
|
|
|
const items = initialItems; |
|
|
|
let updateCb: (() => void) = () => undefined; |
|
|
|
let updateCb: (() => void) = () => undefined; |
|
|
|
|
|
|
|
|
|
|
|