1- 'use client' ;
2-
3- import { InviteTeamMemberDialog } from 'features/teams/invite' ;
4- import { ChevronRight , SquarePlusIcon , UserRound , UsersRound } from 'lucide-react' ;
5- import Link from 'next/link' ;
6- import { routes } from 'shared/config' ;
71import {
8- Collapsible ,
9- CollapsibleContent ,
10- CollapsibleTrigger ,
112 Separator ,
123 Sidebar ,
134 SidebarContent ,
14- SidebarFooter ,
155 SidebarGroup ,
166 SidebarHeader ,
177 SidebarMenu ,
18- SidebarMenuAction ,
19- SidebarMenuButton ,
20- SidebarMenuItem ,
21- SidebarMenuSub ,
22- SidebarMenuSubButton ,
23- SidebarMenuSubItem ,
248 SidebarRail ,
259} from 'shared/ui' ;
26- import { NavUser } from './NavUser' ;
2710import { TeamsDropdown } from './teams/TeamsDropdown' ;
2811import { Projects } from './Projects' ;
29-
30- const team = [
31- {
32- url : routes . team . members ( ) ,
33- title : 'Участники' ,
34- action : (
35- < InviteTeamMemberDialog asChild >
36- < SquarePlusIcon />
37- </ InviteTeamMemberDialog >
38- ) ,
39- } ,
40- { url : routes . team . invitations ( ) , title : 'Приглашения' , action : null } ,
41- { url : routes . team . roles ( ) , title : 'Роли' , action : null } ,
42- { url : routes . team . settings ( ) , title : 'Настройки' , action : null } ,
43- ] ;
12+ import { MyTeams } from './MyTeams' ;
13+ import { Team } from './Team' ;
4414
4515export function AppSidebar ( { ...props } : Omit < React . ComponentProps < typeof Sidebar > , 'children' > ) {
4616 return (
@@ -51,49 +21,13 @@ export function AppSidebar({ ...props }: Omit<React.ComponentProps<typeof Sideba
5121 < SidebarContent className = "gap-2" >
5222 < SidebarGroup >
5323 < SidebarMenu >
54- < SidebarMenuItem >
55- < SidebarMenuButton asChild >
56- < Link href = { routes . profile . root ( ) } >
57- < UserRound />
58- < span > Мой профиль</ span >
59- </ Link >
60- </ SidebarMenuButton >
61- </ SidebarMenuItem >
62- < Collapsible asChild defaultOpen className = "group/collapsible" >
63- < SidebarMenuItem >
64- < CollapsibleTrigger asChild >
65- < SidebarMenuButton tooltip = "Управление командой" >
66- < UsersRound />
67- < span > Команда</ span >
68- < ChevronRight className = "ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90" />
69- </ SidebarMenuButton >
70- </ CollapsibleTrigger >
71- < CollapsibleContent >
72- < SidebarMenuSub >
73- { team . map ( ( subItem ) => (
74- < SidebarMenuSubItem key = { subItem . title } >
75- < SidebarMenuSubButton asChild >
76- < a href = { subItem . url } >
77- < span > { subItem . title } </ span >
78- </ a >
79- </ SidebarMenuSubButton >
80- { subItem . action ? (
81- < SidebarMenuAction > { subItem . action } </ SidebarMenuAction >
82- ) : null }
83- </ SidebarMenuSubItem >
84- ) ) }
85- </ SidebarMenuSub >
86- </ CollapsibleContent >
87- </ SidebarMenuItem >
88- </ Collapsible >
24+ < MyTeams />
25+ < Team />
8926 </ SidebarMenu >
9027 </ SidebarGroup >
9128 < Separator />
9229 < Projects />
9330 </ SidebarContent >
94- < SidebarFooter >
95- < NavUser />
96- </ SidebarFooter >
9731 < SidebarRail />
9832 </ Sidebar >
9933 ) ;
0 commit comments