renderSidebar() { const collectionsHTML = this.getCollectionsHTML(); const activeSpace = this.state.spaces.find(s => s.id === this.state.activeSpaceId); let notificationsBannerHTML = ''; if (activeSpace && activeSpace.notifications && activeSpace.notifications.length > 0) { notificationsBannerHTML = `
${activeSpace.notifications.length} pending share request${activeSpace.notifications.length > 1 ? 's' : ''}
`; } const spaceOptionsHTML = ` ${this.state.spaces.map(s => ` `).join('')} `; this.dom.sidebar.innerHTML = ` ${activeSpace ? ` ${notificationsBannerHTML} ` : `
Select a workspace
from the dashboard
`}
`; }