Navigation: gemeinsamer Kopfbereich statt getrennter Bereiche
Eine Leiste für alles: Gruppe "Speiseplan" (Wochenplan, Gerichte, Allergene & Zusatzstoffe) und für Admins zusätzlich Gruppe "Verwaltung" (Benutzer, Design). Aktiver Menüpunkt wird hervorgehoben, die Konto-Seite nutzt denselben Header – kein Hin- und Herspringen mehr zwischen Kantinen-Bereich und Verwaltung.
This commit is contained in:
+5
-14
@@ -1,6 +1,6 @@
|
||||
import { redirect } from "next/navigation";
|
||||
import Link from "next/link";
|
||||
import { createClient } from "@/lib/supabase/server";
|
||||
import AppHeader from "@/components/AppHeader";
|
||||
import AccountManager from "@/components/AccountManager";
|
||||
|
||||
export default async function KontoPage() {
|
||||
@@ -19,19 +19,10 @@ export default async function KontoPage() {
|
||||
|
||||
return (
|
||||
<div className="flex-1 flex flex-col">
|
||||
<header className="bg-[var(--c-primary-dark)] text-white">
|
||||
<div className="max-w-[1600px] mx-auto w-full px-4 py-3 flex flex-wrap items-center gap-x-5 gap-y-2">
|
||||
<span className="font-bold">Mein Konto</span>
|
||||
<nav className="ml-auto flex flex-wrap gap-x-4 gap-y-1 text-sm">
|
||||
<Link
|
||||
href={profile.role === "admin" ? "/admin" : "/intern"}
|
||||
className="hover:underline"
|
||||
>
|
||||
← Zurück
|
||||
</Link>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
<AppHeader
|
||||
role={profile.role}
|
||||
displayName={profile.full_name || user.email || ""}
|
||||
/>
|
||||
<main className="max-w-[1600px] mx-auto w-full px-4 py-6 flex-1">
|
||||
<AccountManager
|
||||
role={profile.role}
|
||||
|
||||
Reference in New Issue
Block a user