31 lines
732 B
TypeScript
31 lines
732 B
TypeScript
"use client";
|
|
|
|
import { ArrowLeftRight, Plane, Workflow } from "lucide-react";
|
|
import Link from "next/link";
|
|
import { usePathname } from "next/navigation";
|
|
|
|
export default function ModeSwitchDropdown() {
|
|
const path = usePathname();
|
|
|
|
return (
|
|
<details className="dropdown z-[9999]">
|
|
<summary className="btn m-1">
|
|
<ArrowLeftRight /> {path.includes("pilot") && "Pilot"}
|
|
{path.includes("dispatch") && "Leitstelle"}
|
|
</summary>
|
|
<ul className="menu dropdown-content bg-base-100 rounded-box z-1 w-52 p-2 shadow-sm">
|
|
<li>
|
|
<Link href={"/dispatch"}>
|
|
<Workflow /> Leitstelle
|
|
</Link>
|
|
</li>
|
|
<li>
|
|
<Link href={"/pilot"}>
|
|
<Plane /> Pilot
|
|
</Link>
|
|
</li>
|
|
</ul>
|
|
</details>
|
|
);
|
|
}
|