diff --git a/frontend/app/dashboard/invoices/[id]/page.tsx b/frontend/app/dashboard/invoices/[id]/page.tsx index 13ce1a4d..ee0b78f1 100644 --- a/frontend/app/dashboard/invoices/[id]/page.tsx +++ b/frontend/app/dashboard/invoices/[id]/page.tsx @@ -7,6 +7,7 @@ import { Button } from '@/components/ui/button'; import { ArrowLeft, Download } from 'lucide-react'; import Link from 'next/link'; import { Skeleton } from '@/components/ui/skeleton'; +import { PageBreadcrumb } from '@/components/layout/PageBreadcrumb'; export default function InvoiceDetailPage() { const params = useParams(); @@ -51,7 +52,15 @@ export default function InvoiceDetailPage() { }; return ( -
+
+ + -<<<<<<< feat/qr-code -
- - {/* 3. I dropped the new component right here! */} - - - {/* Notifications */} - - - {/* User menu */} - - - - - - -
-

{name || 'User'}

-

{email || 'No email'}

-

{shortAddress}

-
-
- - - - Profile - - - - Settings - - - - - Logout - -
-
-======= {/* Theme schedule settings */}
->>>>>>> main
+
+ + {/* Breadcrumb Navigation */} + {breadcrumbs.length > 0 && ( +
+ + + {breadcrumbs.map((item, index) => ( +
+ + + {item.label} + + + {index < breadcrumbs.length - 1 && } +
+ ))} +
+
+
+ )} setThemeSettingsOpen(false)} /> ); -<<<<<<< feat/qr-code -} -======= } ->>>>>>> main diff --git a/frontend/components/layout/PageBreadcrumb.tsx b/frontend/components/layout/PageBreadcrumb.tsx new file mode 100644 index 00000000..659fced5 --- /dev/null +++ b/frontend/components/layout/PageBreadcrumb.tsx @@ -0,0 +1,43 @@ +'use client'; + +import React from 'react'; +import { + Breadcrumb, + BreadcrumbList, + BreadcrumbItem, + BreadcrumbLink, + BreadcrumbPage, + BreadcrumbSeparator, +} from '@/components/ui/breadcrumb'; + +export interface BreadcrumbItemData { + label: string; + href: string; +} + +interface PageBreadcrumbProps { + items: BreadcrumbItemData[]; + currentPage: string; +} + +export function PageBreadcrumb({ items, currentPage }: PageBreadcrumbProps) { + return ( + + + {items.map((item, index) => ( + + + + {item.label} + + + + + ))} + + {currentPage} + + + + ); +} diff --git a/frontend/components/ui/breadcrumb.tsx b/frontend/components/ui/breadcrumb.tsx new file mode 100644 index 00000000..d9d55031 --- /dev/null +++ b/frontend/components/ui/breadcrumb.tsx @@ -0,0 +1,130 @@ +import * as React from "react" +import { Slot } from "@radix-ui/react-slot" +import { cva, type VariantProps } from "class-variance-authority" +import { ChevronRight } from "lucide-react" +import { cn } from "@/lib/utils" +import Link from "next/link" + +const breadcrumbVariants = cva("flex items-center gap-1.5") + +interface BreadcrumbProps + extends React.HTMLAttributes, + VariantProps {} + +const Breadcrumb = React.forwardRef( + ({ className, ...props }, ref) => ( +