/** * Main dashboard layout with navigation */ import { Link, Outlet, useLocation } from "react-router-dom"; import { useQuery } from "@tanstack/react-query"; import { authApi } from "../services/api"; const navigation = [ { name: "Dashboard", href: "/" }, { name: "Servers", href: "/servers" }, { name: "Users", href: "/users" }, { name: "Chats", href: "/chats" }, { name: "Moderation", href: "/moderation" }, { name: "Analytics", href: "/analytics" }, { name: "Settings", href: "/settings" }, ]; export function Layout() { const location = useLocation(); const { data: me } = useQuery({ queryKey: ["me"], queryFn: authApi.getMe, }); return (
{/* Header */}

GuardDen

{me?.owner ? (
{me.entra ? "✓ Entra" : ""} {me.discord ? "✓ Discord" : ""} Logout
) : ( )}
{/* Main content */}
{!me?.owner ? (

Authentication Required

Please authenticate with both Entra ID and Discord to access the dashboard.

Login with Entra Connect Discord
) : ( )}
{/* Footer */}
); }