|
@@ -1,25 +1,3 @@
|
|
|
-import {
|
|
|
|
|
- IconBarrierBlock,
|
|
|
|
|
- IconBrowserCheck,
|
|
|
|
|
- IconBug,
|
|
|
|
|
- IconChecklist,
|
|
|
|
|
- IconError404,
|
|
|
|
|
- IconHelp,
|
|
|
|
|
- IconLayoutDashboard,
|
|
|
|
|
- IconLock,
|
|
|
|
|
- IconLockAccess,
|
|
|
|
|
- IconMessages,
|
|
|
|
|
- IconNotification,
|
|
|
|
|
- IconPackages,
|
|
|
|
|
- IconPalette,
|
|
|
|
|
- IconServerOff,
|
|
|
|
|
- IconSettings,
|
|
|
|
|
- IconTool,
|
|
|
|
|
- IconUserCog,
|
|
|
|
|
- IconUserOff,
|
|
|
|
|
- IconUsers,
|
|
|
|
|
-} from '@tabler/icons-react'
|
|
|
|
|
-import { AudioWaveform, Command, GalleryVerticalEnd } from 'lucide-react'
|
|
|
|
|
import {
|
|
import {
|
|
|
Sidebar,
|
|
Sidebar,
|
|
|
SidebarContent,
|
|
SidebarContent,
|
|
@@ -30,183 +8,21 @@ import {
|
|
|
import { NavGroup } from '@/components/layout/nav-group'
|
|
import { NavGroup } from '@/components/layout/nav-group'
|
|
|
import { NavUser } from '@/components/layout/nav-user'
|
|
import { NavUser } from '@/components/layout/nav-user'
|
|
|
import { TeamSwitcher } from '@/components/layout/team-switcher'
|
|
import { TeamSwitcher } from '@/components/layout/team-switcher'
|
|
|
-import { type SidebarData } from './types'
|
|
|
|
|
-
|
|
|
|
|
-// SideNav data
|
|
|
|
|
-const data: SidebarData = {
|
|
|
|
|
- user: {
|
|
|
|
|
- name: 'satnaing',
|
|
|
|
|
- email: 'satnaingdev@gmail.com',
|
|
|
|
|
- avatar: '/avatars/shadcn.jpg',
|
|
|
|
|
- },
|
|
|
|
|
- teams: [
|
|
|
|
|
- {
|
|
|
|
|
- name: 'Shadcn Admin',
|
|
|
|
|
- logo: Command,
|
|
|
|
|
- plan: 'Vite + ShadcnUI',
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- name: 'Acme Inc',
|
|
|
|
|
- logo: GalleryVerticalEnd,
|
|
|
|
|
- plan: 'Enterprise',
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- name: 'Acme Corp.',
|
|
|
|
|
- logo: AudioWaveform,
|
|
|
|
|
- plan: 'Startup',
|
|
|
|
|
- },
|
|
|
|
|
- ],
|
|
|
|
|
- navGroups: [
|
|
|
|
|
- {
|
|
|
|
|
- title: 'General',
|
|
|
|
|
- items: [
|
|
|
|
|
- {
|
|
|
|
|
- title: 'Dashboard',
|
|
|
|
|
- url: '/dashboard',
|
|
|
|
|
- icon: IconLayoutDashboard,
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: 'Tasks',
|
|
|
|
|
- url: '/tasks',
|
|
|
|
|
- icon: IconChecklist,
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: 'Apps',
|
|
|
|
|
- url: '/apps',
|
|
|
|
|
- icon: IconPackages,
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: 'Chats',
|
|
|
|
|
- url: '/chats',
|
|
|
|
|
- badge: '3',
|
|
|
|
|
- icon: IconMessages,
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: 'Users',
|
|
|
|
|
- url: '/',
|
|
|
|
|
- icon: IconUsers,
|
|
|
|
|
- },
|
|
|
|
|
- ],
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: 'Pages',
|
|
|
|
|
- items: [
|
|
|
|
|
- {
|
|
|
|
|
- title: 'Auth',
|
|
|
|
|
- icon: IconLockAccess,
|
|
|
|
|
- items: [
|
|
|
|
|
- {
|
|
|
|
|
- title: 'Sign In',
|
|
|
|
|
- url: '/sign-in',
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: 'Sign In (2 Col)',
|
|
|
|
|
- url: '/sign-in-2',
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: 'Sign Up',
|
|
|
|
|
- url: '/sign-up',
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: 'Forgot Password',
|
|
|
|
|
- url: '/forgot-password',
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: 'OTP',
|
|
|
|
|
- url: '/otp',
|
|
|
|
|
- },
|
|
|
|
|
- ],
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: 'Errors',
|
|
|
|
|
- icon: IconBug,
|
|
|
|
|
- items: [
|
|
|
|
|
- {
|
|
|
|
|
- title: 'Unauthorized',
|
|
|
|
|
- url: '/401',
|
|
|
|
|
- icon: IconLock,
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: 'Forbidden',
|
|
|
|
|
- url: '/403',
|
|
|
|
|
- icon: IconUserOff,
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: 'Not Found',
|
|
|
|
|
- url: '/404',
|
|
|
|
|
- icon: IconError404,
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: 'Internal Server Error',
|
|
|
|
|
- url: '/500',
|
|
|
|
|
- icon: IconServerOff,
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: 'Maintenance Error',
|
|
|
|
|
- url: '/503',
|
|
|
|
|
- icon: IconBarrierBlock,
|
|
|
|
|
- },
|
|
|
|
|
- ],
|
|
|
|
|
- },
|
|
|
|
|
- ],
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: 'Other',
|
|
|
|
|
- items: [
|
|
|
|
|
- {
|
|
|
|
|
- title: 'Settings',
|
|
|
|
|
- icon: IconSettings,
|
|
|
|
|
- items: [
|
|
|
|
|
- {
|
|
|
|
|
- title: 'Profile',
|
|
|
|
|
- url: '/settings',
|
|
|
|
|
- icon: IconUserCog,
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: 'Account',
|
|
|
|
|
- url: '/settings/account',
|
|
|
|
|
- icon: IconTool,
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: 'Appearance',
|
|
|
|
|
- url: '/settings/appearance',
|
|
|
|
|
- icon: IconPalette,
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: 'Notifications',
|
|
|
|
|
- url: '/settings/notifications',
|
|
|
|
|
- icon: IconNotification,
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: 'Display',
|
|
|
|
|
- url: '/settings/display',
|
|
|
|
|
- icon: IconBrowserCheck,
|
|
|
|
|
- },
|
|
|
|
|
- ],
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: 'Help Center',
|
|
|
|
|
- url: '/help-center',
|
|
|
|
|
- icon: IconHelp,
|
|
|
|
|
- },
|
|
|
|
|
- ],
|
|
|
|
|
- },
|
|
|
|
|
- ],
|
|
|
|
|
-}
|
|
|
|
|
|
|
+import { sidebarData } from './data/sidebar-data'
|
|
|
|
|
|
|
|
export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
|
|
export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
|
|
|
return (
|
|
return (
|
|
|
<Sidebar collapsible='icon' {...props}>
|
|
<Sidebar collapsible='icon' {...props}>
|
|
|
<SidebarHeader>
|
|
<SidebarHeader>
|
|
|
- <TeamSwitcher teams={data.teams} />
|
|
|
|
|
|
|
+ <TeamSwitcher teams={sidebarData.teams} />
|
|
|
</SidebarHeader>
|
|
</SidebarHeader>
|
|
|
<SidebarContent>
|
|
<SidebarContent>
|
|
|
- {data.navGroups.map((props) => (
|
|
|
|
|
|
|
+ {sidebarData.navGroups.map((props) => (
|
|
|
<NavGroup key={props.title} {...props} />
|
|
<NavGroup key={props.title} {...props} />
|
|
|
))}
|
|
))}
|
|
|
</SidebarContent>
|
|
</SidebarContent>
|
|
|
<SidebarFooter>
|
|
<SidebarFooter>
|
|
|
- <NavUser user={data.user} />
|
|
|
|
|
|
|
+ <NavUser user={sidebarData.user} />
|
|
|
</SidebarFooter>
|
|
</SidebarFooter>
|
|
|
<SidebarRail />
|
|
<SidebarRail />
|
|
|
</Sidebar>
|
|
</Sidebar>
|