27 lines
742 B
TypeScript
27 lines
742 B
TypeScript
"use client";
|
|
|
|
import { UserNav } from "./UserNav";
|
|
import { usePathname } from "next/navigation";
|
|
|
|
const pageTitles: Record<string, string> = {
|
|
"/": "Dashboard",
|
|
"/reservas": "Reservas",
|
|
"/lista-espera": "Lista de Espera",
|
|
"/mesas": "Mesas",
|
|
"/equipa": "Equipa",
|
|
"/historico": "Histórico",
|
|
"/configuracoes": "Configurações",
|
|
};
|
|
|
|
export function Header() {
|
|
const pathname = usePathname();
|
|
const title = pageTitles[pathname] || "Dashboard";
|
|
|
|
return (
|
|
<header className="hidden md:flex h-20 items-center justify-between px-8 border-b border-border bg-card/50 backdrop-blur-sm sticky top-0 z-30">
|
|
<h2 className="text-xl font-display font-bold text-foreground">{title}</h2>
|
|
<UserNav />
|
|
</header>
|
|
);
|
|
}
|