chore: add project files and setup gitignore
This commit is contained in:
26
reserva-mesa-dashboard/components/dashboard/Header.tsx
Normal file
26
reserva-mesa-dashboard/components/dashboard/Header.tsx
Normal file
@@ -0,0 +1,26 @@
|
||||
"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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user