import clsx from 'clsx'; import { Home } from 'lucide-react'; import { useIsEdgeAdmin, useIsPureAdmin } from '@/react/hooks/useUser'; import { useIsCurrentUserTeamLeader } from '@/portainer/users/queries'; import { usePublicSettings } from '@/react/portainer/settings/queries'; import styles from './Sidebar.module.css'; import { EdgeComputeSidebar } from './EdgeComputeSidebar'; import { EnvironmentSidebar } from './EnvironmentSidebar'; import { SettingsSidebar } from './SettingsSidebar'; import { SidebarItem } from './SidebarItem'; import { Footer } from './Footer'; import { Header } from './Header'; import { SidebarProvider, useSidebarState } from './useSidebarState'; import { UpgradeBEBannerWrapper } from './UpgradeBEBanner'; export function Sidebar() { return ( /* in the future (when we remove r2a) this should wrap the whole app - to change root styles */ ); } function InnerSidebar() { const isPureAdmin = useIsPureAdmin(); const isAdminQuery = useIsEdgeAdmin({ noEnvScope: true }); const isTeamLeader = useIsCurrentUserTeamLeader(); const { isOpen } = useSidebarState(); const settingsQuery = usePublicSettings(); if (!settingsQuery.data || isAdminQuery.isLoading) { return null; } const { isAdmin } = isAdminQuery; const { LogoURL } = settingsQuery.data; return (
); }