Files
codey.lol/src/components/qs2/BreadcrumbNav.jsx

26 lines
958 B
React
Raw Normal View History

2025-07-31 19:28:59 -04:00
import React from "react";
export default function BreadcrumbNav({ currentPage }) {
const pages = [
2025-07-31 19:35:00 -04:00
{ key: "request", label: "Request Media", href: "." },
2025-07-31 19:28:59 -04:00
{ key: "management", label: "Manage Requests", href: "requests" },
];
return (
<nav aria-label="breadcrumb" className="mb-6 flex gap-4 text-sm font-medium text-blue-600 dark:text-blue-400">
{pages.map(({ key, label, href }, i) => (
<React.Fragment key={key}>
<a
href={href}
className={`hover:underline ${currentPage === key ? "font-bold underline" : ""}`}
aria-current={currentPage === key ? "page" : undefined}
>
{label}
</a>
{i < pages.length - 1 && <span aria-hidden="true">/</span>}
</React.Fragment>
))}
</nav>
);
}