sabo/src/components/dashboard/team-switcher.tsx
When to use
- Let users quickly switch team/project context without leaving the dashboard.
Usage
Styling tip
- The switcher appears at the top of the sidebar with team logo, name, and plan displayed.
Steps
1
Provide teams array
Define teams with
name, logo (React component), and plan fields. Can be static or fetched from Supabase.2
Handle selection
The component uses local state (
useState) to track the active team. Extend this to update global context or route based on selection.3
Persist selection
Store the selected team ID in localStorage or user profile to restore on next visit.