diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx index 280217a0..4998ca66 100644 --- a/src/components/Navbar.tsx +++ b/src/components/Navbar.tsx @@ -1,26 +1,26 @@ 'use client'; import toast from 'react-hot-toast'; -import { useRouter } from 'next/navigation'; +import { usePathname, useRouter } from 'next/navigation'; import { Icon } from '@iconify/react'; -import Menu from '@/components/menu/Menu'; -import MenuItem from '@/components/menu/MenuItem'; import Button from '@/components/Button'; -import Dropdown from '@/components/Dropdown'; +import Breadcrumb, { buildBreadcrumbs } from '@/components/Breadcrumb'; +import PopoverButton from '@/components/popover/PopoverButton'; +import PopoverContent from '@/components/popover/PopoverContent'; import { useAuth } from '@/services/hooks/useAuth'; import { AuthApi } from '@/services/api/auth'; import { isResponseError } from '@/lib/api-helper'; interface NavbarProps { - title: string; toggleSidebar?: () => void; } -const Navbar = ({ title, toggleSidebar }: NavbarProps) => { +const Navbar = ({ toggleSidebar }: NavbarProps) => { const { setUser } = useAuth(); const router = useRouter(); + const pathname = usePathname(); const logoutClickHandler = async () => { const logoutRes = await AuthApi.logout(); @@ -35,42 +35,52 @@ const Navbar = ({ title, toggleSidebar }: NavbarProps) => { }; return ( -
+
{toggleSidebar && ( - )} - {title} +
- -
- -
-
- } - className={{ - content: 'w-52 mt-3', - }} + - - - - + + + + + +
);