From 13a35905597e1086d2d7e9fff3b55fce3e3e2a45 Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Fri, 15 Jul 2022 13:43:11 +0300 Subject: [PATCH] use new API response for getting the menu items --- sharedComponents/navigationBar.component.ts | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/sharedComponents/navigationBar.component.ts b/sharedComponents/navigationBar.component.ts index 06dc9d15..fab308ad 100644 --- a/sharedComponents/navigationBar.component.ts +++ b/sharedComponents/navigationBar.component.ts @@ -115,21 +115,12 @@ export class NavigationBarComponent implements OnInit, OnDestroy { this.handleError('Error getting community information (e.g. pages,entities) for community with id: ' + this.communityId, error); })); } - if(this.properties.environment == "development" && this.portal != 'connect' && this.portal != 'connect-admin' && this.properties.adminToolsPortalType == 'community') { + if(this.portal != 'connect' && this.portal != 'connect-admin' && this.properties.adminToolsPortalType == 'community') { this.subs.push( this._helpContentService.getMenuItems(this.portal).subscribe( data => { - // Will divide all the custom menu items into 2 arrays. - // One for the extra(added next to the hardcoded menu items in the existing nav bar) - additionalMenuItems - // One for the featured(new nav bar below the existing one) - featuredMenuItems - data.forEach(menuItem => { - if(menuItem.isFeatured) { - this.featuredMenuItems.push(menuItem); - } else { - // disable additional menu items for now - // this.additionalMenuItems.push(menuItem); - } - }); + this.featuredMenuItems = data.featuredMenuItems; + this.additionalMenuItems = data.menuItems; }, error => this.handleError("Server error fetching custom menu items", error) )