forked from fahrPool/fahrPool
29 lines
825 B
TypeScript
29 lines
825 B
TypeScript
import Link from "next/link";
|
|
import { canManageUsers, type Role } from "@/lib/auth/roles";
|
|
|
|
export function NavLinks({
|
|
role,
|
|
orientation = "vertical",
|
|
}: {
|
|
role: Role;
|
|
orientation?: "vertical" | "horizontal";
|
|
}) {
|
|
const layoutClass = orientation === "horizontal" ? "flex flex-row items-center gap-6" : "flex flex-col gap-4";
|
|
|
|
return (
|
|
<nav className={layoutClass}>
|
|
<Link href="/dashboard" className="text-asphalt-grey hover:text-performance-blue">
|
|
Dashboard
|
|
</Link>
|
|
<Link href="/auftraege" className="text-asphalt-grey hover:text-performance-blue">
|
|
Aufträge
|
|
</Link>
|
|
{canManageUsers(role) && (
|
|
<Link href="/nutzerverwaltung" className="text-asphalt-grey hover:text-performance-blue">
|
|
Nutzerverwaltung
|
|
</Link>
|
|
)}
|
|
</nav>
|
|
);
|
|
}
|