diff --git a/src/components/DocsNavigation.astro b/src/components/DocsNavigation.astro index c852808c..d43aa6df 100644 --- a/src/components/DocsNavigation.astro +++ b/src/components/DocsNavigation.astro @@ -17,7 +17,8 @@ const users = await getUsers(); const messages = [...events, ...commands]; -const allData = [ ...domains, ...services, ...messages, ...teams, ...users]; +// @ts-ignore +const allData = [...domains, ...services, ...messages, ...teams, ...users]; const eventCatalogConfig = config as CatalogConfig; const { services: servicesConfig, domains: domainsConfig, messages: messagesConfig, teams: teamsConfig, users: usersConfig, showPageHeadings = true } = eventCatalogConfig?.docs?.sidebar || {}; @@ -26,7 +27,7 @@ const getConfigValue = (obj: any, key:string, defaultValue: any) => { return obj?.[key] ?? defaultValue; } -const visibleCollections = { +const visibleCollections: {[key:string]: boolean} = { events: getConfigValue(messagesConfig, 'visible', true), commands: getConfigValue(messagesConfig, 'visible', true), domains: getConfigValue(domainsConfig, 'visible', true), @@ -76,36 +77,36 @@ const currentPath = Astro.url.pathname; ---
- { - Object.keys(sideNav).map((key) => { - const collection = sideNav[key]; + { + Object.keys(sideNav).map((key) => { + const collection = sideNav[key]; if(collection[0] && collection[0].visible === false) return null; - return ( - + ); + }) + }