mirror of
https://gitlab.massbug.com/massbug/judge4c.git
synced 2025-07-04 12:12:12 +00:00
feat(app-sidebar): replace TeamSwitcher with WorkspaceSwitcher in sidebar component
This commit is contained in:
parent
94f49eefd9
commit
67a93aa671
@ -1,23 +1,15 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import * as React from "react";
|
|
||||||
import {
|
import {
|
||||||
AudioWaveform,
|
|
||||||
BookOpen,
|
BookOpen,
|
||||||
Bot,
|
Bot,
|
||||||
Command,
|
|
||||||
Frame,
|
Frame,
|
||||||
GalleryVerticalEnd,
|
|
||||||
Map,
|
Map,
|
||||||
PieChart,
|
PieChart,
|
||||||
Settings2,
|
Settings2,
|
||||||
SquareTerminal,
|
SquareTerminal,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
|
import * as React from "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 {
|
import {
|
||||||
Sidebar,
|
Sidebar,
|
||||||
SidebarContent,
|
SidebarContent,
|
||||||
@ -25,26 +17,13 @@ import {
|
|||||||
SidebarHeader,
|
SidebarHeader,
|
||||||
SidebarRail,
|
SidebarRail,
|
||||||
} from "@/components/ui/sidebar";
|
} 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.
|
// This is sample data.
|
||||||
const 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: [
|
navMain: [
|
||||||
{
|
{
|
||||||
title: "Playground",
|
title: "Playground",
|
||||||
@ -155,7 +134,7 @@ export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
|
|||||||
return (
|
return (
|
||||||
<Sidebar collapsible="icon" {...props}>
|
<Sidebar collapsible="icon" {...props}>
|
||||||
<SidebarHeader>
|
<SidebarHeader>
|
||||||
<TeamSwitcher teams={data.teams} />
|
<WorkspaceSwitcher />
|
||||||
</SidebarHeader>
|
</SidebarHeader>
|
||||||
<SidebarContent>
|
<SidebarContent>
|
||||||
<NavMain items={data.navMain} />
|
<NavMain items={data.navMain} />
|
||||||
|
Loading…
Reference in New Issue
Block a user