import { Users, Award, Settings, HardDrive, Radio, FileText, Bell, } from 'react-feather'; import { usePublicSettings } from '@/react/portainer/settings/queries'; import { FeatureFlag, useFeatureFlag, } from '@/portainer/feature-flags/useRedirectFeatureFlag'; import { SidebarItem } from './SidebarItem'; import { SidebarSection } from './SidebarSection'; interface Props { isAdmin: boolean; isTeamLeader?: boolean; } export function SettingsSidebar({ isAdmin, isTeamLeader }: Props) { const teamSyncQuery = usePublicSettings({ select: (settings) => settings.TeamSync, }); const isEdgeRemoteUpgradeEnabledQuery = useFeatureFlag( FeatureFlag.EdgeRemoteUpdate ); const showUsersSection = !window.ddExtension && (isAdmin || (isTeamLeader && !teamSyncQuery.data)); return ( {showUsersSection && ( {isAdmin && ( )} )} {isAdmin && ( <> {isEdgeRemoteUpgradeEnabledQuery.data && ( )} {process.env.PORTAINER_EDITION !== 'CE' && ( )} )} {isAdmin && ( {!window.ddExtension && ( )} {process.env.PORTAINER_EDITION !== 'CE' && ( )} Help / About )} ); }