diff --git a/components/shared/Breadcrumb.tsx b/components/shared/Breadcrumb.tsx new file mode 100644 index 0000000..aa81153 --- /dev/null +++ b/components/shared/Breadcrumb.tsx @@ -0,0 +1,57 @@ +"use client"; + +import { usePathname } from "next/navigation"; +import Link from "next/link"; +import { ChevronRight, Home, FileText } from "lucide-react"; + +const truncateText = (text: string, maxLength: number) => { + return text.length > maxLength ? text.slice(0, maxLength) + "..." : text; +}; + +export default function Breadcrumb() { + const pathname = usePathname(); + const pathSegments = pathname.split("/").filter((segment) => segment !== ""); + + return ( + + ); +} diff --git a/components/shared/Navbar.tsx b/components/shared/Navbar.tsx index 50a916a..cf6e62f 100644 --- a/components/shared/Navbar.tsx +++ b/components/shared/Navbar.tsx @@ -15,18 +15,18 @@ import { } from "@/components/ui/dropdown-menu"; import { useContext } from "react"; import { MainContext } from "@/contexts/MainContext"; -import { Notification, SearchBar } from "."; +import { Notification, Breadcrumb } from "."; export default function Navbar() { const { handleLang, lang, openSidebar } = useContext(MainContext); return ( -