|
|
|
@ -1,14 +1,6 @@
|
|
|
|
'use client'
|
|
|
|
'use client'
|
|
|
|
|
|
|
|
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
Avatar,
|
|
|
|
|
|
|
|
AvatarIcon,
|
|
|
|
|
|
|
|
Button,
|
|
|
|
|
|
|
|
Dropdown,
|
|
|
|
|
|
|
|
DropdownMenu,
|
|
|
|
|
|
|
|
DropdownItem,
|
|
|
|
|
|
|
|
DropdownTrigger,
|
|
|
|
|
|
|
|
Link,
|
|
|
|
|
|
|
|
Navbar as NextUINavbar,
|
|
|
|
Navbar as NextUINavbar,
|
|
|
|
NavbarContent,
|
|
|
|
NavbarContent,
|
|
|
|
NavbarMenu,
|
|
|
|
NavbarMenu,
|
|
|
|
@ -16,7 +8,16 @@ import {
|
|
|
|
NavbarBrand,
|
|
|
|
NavbarBrand,
|
|
|
|
NavbarItem,
|
|
|
|
NavbarItem,
|
|
|
|
NavbarMenuItem,
|
|
|
|
NavbarMenuItem,
|
|
|
|
} from '@nextui-org/react'
|
|
|
|
} from '@nextui-org/navbar'
|
|
|
|
|
|
|
|
import {
|
|
|
|
|
|
|
|
Dropdown,
|
|
|
|
|
|
|
|
DropdownMenu,
|
|
|
|
|
|
|
|
DropdownItem,
|
|
|
|
|
|
|
|
DropdownTrigger,
|
|
|
|
|
|
|
|
} from '@nextui-org/dropdown'
|
|
|
|
|
|
|
|
import { Avatar, AvatarIcon } from '@nextui-org/avatar'
|
|
|
|
|
|
|
|
import { Link } from '@nextui-org/link'
|
|
|
|
|
|
|
|
import { Button } from '@nextui-org/react'
|
|
|
|
|
|
|
|
|
|
|
|
import { link as linkStyles } from '@nextui-org/theme'
|
|
|
|
import { link as linkStyles } from '@nextui-org/theme'
|
|
|
|
|
|
|
|
|
|
|
|
@ -69,15 +70,10 @@ export const Navbar = ({
|
|
|
|
icon={'mdi:bookmark-box'}
|
|
|
|
icon={'mdi:bookmark-box'}
|
|
|
|
fontSize={32}
|
|
|
|
fontSize={32}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
|
|
|
|
<p className='font-bold text-inherit'>Dashboard</p>
|
|
|
|
</NextLink>
|
|
|
|
</NextLink>
|
|
|
|
</NavbarBrand>
|
|
|
|
</NavbarBrand>
|
|
|
|
{siteConfig.navItems.map((item) => {
|
|
|
|
{siteConfig.navItems.map((item) => (
|
|
|
|
if (
|
|
|
|
|
|
|
|
pathname.startsWith('/dashboard') &&
|
|
|
|
|
|
|
|
item.label === 'Dashboard'
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
|
|
|
<NavbarItem
|
|
|
|
<NavbarItem
|
|
|
|
key={item.href}
|
|
|
|
key={item.href}
|
|
|
|
className='hidden sm:flex'>
|
|
|
|
className='hidden sm:flex'>
|
|
|
|
@ -91,8 +87,7 @@ export const Navbar = ({
|
|
|
|
{item.label}
|
|
|
|
{item.label}
|
|
|
|
</NextLink>
|
|
|
|
</NextLink>
|
|
|
|
</NavbarItem>
|
|
|
|
</NavbarItem>
|
|
|
|
)
|
|
|
|
))}
|
|
|
|
})}
|
|
|
|
|
|
|
|
{pathname.startsWith('/dashboard') && (
|
|
|
|
{pathname.startsWith('/dashboard') && (
|
|
|
|
<NavbarItem className='hidden sm:flex'>
|
|
|
|
<NavbarItem className='hidden sm:flex'>
|
|
|
|
<Dropdown>
|
|
|
|
<Dropdown>
|
|
|
|
@ -161,23 +156,23 @@ export const Navbar = ({
|
|
|
|
|
|
|
|
|
|
|
|
<NavbarMenu>
|
|
|
|
<NavbarMenu>
|
|
|
|
<div className='mx-4 mt-2 flex flex-col gap-2'>
|
|
|
|
<div className='mx-4 mt-2 flex flex-col gap-2'>
|
|
|
|
{siteConfig.navMenuItems.map((item, index) => {
|
|
|
|
{siteConfig.navMenuItems.map((item, index) => (
|
|
|
|
if (
|
|
|
|
|
|
|
|
pathname.startsWith('/dashboard') &&
|
|
|
|
|
|
|
|
item.label === 'Dashboard'
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
|
|
|
<NavbarMenuItem key={`${item}-${index}`}>
|
|
|
|
<NavbarMenuItem key={`${item}-${index}`}>
|
|
|
|
<Link
|
|
|
|
<Link
|
|
|
|
color={'foreground'}
|
|
|
|
color={
|
|
|
|
|
|
|
|
index === 2
|
|
|
|
|
|
|
|
? 'primary'
|
|
|
|
|
|
|
|
: index ===
|
|
|
|
|
|
|
|
siteConfig.navMenuItems.length - 1
|
|
|
|
|
|
|
|
? 'danger'
|
|
|
|
|
|
|
|
: 'foreground'
|
|
|
|
|
|
|
|
}
|
|
|
|
href={item.href}
|
|
|
|
href={item.href}
|
|
|
|
size='lg'>
|
|
|
|
size='lg'>
|
|
|
|
{item.label}
|
|
|
|
{item.label}
|
|
|
|
</Link>
|
|
|
|
</Link>
|
|
|
|
</NavbarMenuItem>
|
|
|
|
</NavbarMenuItem>
|
|
|
|
)
|
|
|
|
))}
|
|
|
|
})}
|
|
|
|
|
|
|
|
{pathname.startsWith('/dashboard') &&
|
|
|
|
{pathname.startsWith('/dashboard') &&
|
|
|
|
categories.length > 0 &&
|
|
|
|
categories.length > 0 &&
|
|
|
|
categories.map((category) => (
|
|
|
|
categories.map((category) => (
|
|
|
|
|