/**
* TeamList - Sidebar Team List Component
*
* Displays a compact list of teams for the sidebar navigation.
*
* @module components/TeamList
*/
import { useEffect } from 'react';
import { useTeamStore } from '../store/teamStore';
import { Users, Plus, Activity, CheckCircle, AlertTriangle } from 'lucide-react';
interface TeamListProps {
onSelectTeam?: (teamId: string) => void;
selectedTeamId?: string;
}
export function TeamList({ onSelectTeam, selectedTeamId }: TeamListProps) {
const { teams, loadTeams, setActiveTeam, isLoading } = useTeamStore();
useEffect(() => {
loadTeams();
}, [loadTeams]);
const handleSelectTeam = (teamId: string) => {
const team = teams.find(t => t.id === teamId);
if (team) {
setActiveTeam(team);
onSelectTeam?.(teamId);
}
};
const getStatusIcon = (status: string) => {
switch (status) {
case 'active':
return
No teams yet
Click + to create one