| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- import { Outlet } from '@tanstack/react-router'
- import {
- IconBrowserCheck,
- IconNotification,
- IconPalette,
- IconTool,
- IconUser,
- } from '@tabler/icons-react'
- import { Separator } from '@/components/ui/separator'
- import { Header } from '@/components/layout/header'
- import { Main } from '@/components/layout/main'
- import { ProfileDropdown } from '@/components/profile-dropdown'
- import { Search } from '@/components/search'
- import { ThemeSwitch } from '@/components/theme-switch'
- import SidebarNav from './components/sidebar-nav'
- export default function Settings() {
- return (
- <>
- {/* ===== Top Heading ===== */}
- <Header>
- <Search />
- <div className='ml-auto flex items-center space-x-4'>
- <ThemeSwitch />
- <ProfileDropdown />
- </div>
- </Header>
- <Main fixed>
- <div className='space-y-0.5'>
- <h1 className='text-2xl font-bold tracking-tight md:text-3xl'>
- Settings
- </h1>
- <p className='text-muted-foreground'>
- Manage your account settings and set e-mail preferences.
- </p>
- </div>
- <Separator className='my-4 lg:my-6' />
- <div className='flex flex-1 flex-col space-y-2 md:space-y-2 overflow-hidden lg:flex-row lg:space-x-12 lg:space-y-0'>
- <aside className='top-0 lg:sticky lg:w-1/5'>
- <SidebarNav items={sidebarNavItems} />
- </aside>
- <div className='flex w-full p-1 pr-4 overflow-y-hidden'>
- <Outlet />
- </div>
- </div>
- </Main>
- </>
- )
- }
- const sidebarNavItems = [
- {
- title: 'Profile',
- icon: <IconUser size={18} />,
- href: '/settings',
- },
- {
- title: 'Account',
- icon: <IconTool size={18} />,
- href: '/settings/account',
- },
- {
- title: 'Appearance',
- icon: <IconPalette size={18} />,
- href: '/settings/appearance',
- },
- {
- title: 'Notifications',
- icon: <IconNotification size={18} />,
- href: '/settings/notifications',
- },
- {
- title: 'Display',
- icon: <IconBrowserCheck size={18} />,
- href: '/settings/display',
- },
- ]
|