feat(app-sidebar): replace TeamSwitcher with WorkspaceSwitcher in sidebar component

This commit is contained in:
ngc2207 2025-02-06 09:21:51 +08:00
parent 94f49eefd9
commit 67a93aa671

View File

@ -1,23 +1,15 @@
"use client";
import * as React from "react";
import {
AudioWaveform,
BookOpen,
Bot,
Command,
Frame,
GalleryVerticalEnd,
Map,
PieChart,
Settings2,
SquareTerminal,
} from "lucide-react";
import { NavMain } from "@/components/nav-main";
import { NavProjects } from "@/components/nav-projects";
import { NavUser } from "@/components/nav-user";
import { TeamSwitcher } from "@/components/team-switcher";
import * as React from "react";
import {
Sidebar,
SidebarContent,
@ -25,26 +17,13 @@ import {
SidebarHeader,
SidebarRail,
} from "@/components/ui/sidebar";
import { NavMain } from "@/components/nav-main";
import { NavUser } from "@/components/nav-user";
import { NavProjects } from "@/components/nav-projects";
import { WorkspaceSwitcher } from "@/components/workspace-switcher";
// This is sample data.
const data = {
teams: [
{
name: "Acme Inc",
logo: GalleryVerticalEnd,
plan: "Enterprise",
},
{
name: "Acme Corp.",
logo: AudioWaveform,
plan: "Startup",
},
{
name: "Evil Corp.",
logo: Command,
plan: "Free",
},
],
navMain: [
{
title: "Playground",
@ -155,7 +134,7 @@ export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
return (
<Sidebar collapsible="icon" {...props}>
<SidebarHeader>
<TeamSwitcher teams={data.teams} />
<WorkspaceSwitcher />
</SidebarHeader>
<SidebarContent>
<NavMain items={data.navMain} />