import { TeamDropdown } from './TeamDropdown/TeamDropdown'; import ChevronDown from '../icons/dropdown.svg'; import { useTeamId } from '../hooks/use-team-id'; import TeamProgress from '../icons/team-progress.svg'; import SettingsIcon from '../icons/cog.svg'; import ChatIcon from '../icons/chat.svg'; import MapIcon from '../icons/map.svg'; import GroupIcon from '../icons/group.svg'; import { useState } from 'react'; import type { ReactNode } from 'react'; import { useStore } from '@nanostores/react'; import { $currentTeam } from '../stores/team'; import { SubmitFeedbackPopup } from './Feedback/SubmitFeedbackPopup'; type TeamSidebarProps = { activePageId: string; children: ReactNode; }; export function TeamSidebar({ activePageId, children }: TeamSidebarProps) { const [menuShown, setMenuShown] = useState(false); const currentTeam = useStore($currentTeam); const [showFeedbackPopup, setShowFeedbackPopup] = useState(false); const { teamId } = useTeamId(); const sidebarLinks = [ { title: 'Progress', href: `/team/progress?t=${teamId}`, id: 'progress', icon: TeamProgress.src, }, { title: 'Roadmaps', href: `/team/roadmaps?t=${teamId}`, id: 'roadmaps', icon: MapIcon.src, hasWarning: currentTeam?.roadmaps?.length === 0, }, { title: 'Members', href: `/team/members?t=${teamId}`, id: 'members', icon: GroupIcon.src, }, { title: 'Settings', href: `/team/settings?t=${teamId}`, id: 'settings', icon: SettingsIcon.src, }, ]; return ( <>