From 7aaa75da0b1aa21c2b38458f04b666223e92465f Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Sun, 28 Sep 2025 18:38:24 +0000 Subject: [PATCH] Add admin dashboard header --- src/components/layout/AdminHeader.tsx | 40 +++++++++++++++++++++++++++ src/pages/Admin.tsx | 20 +++++++------- 2 files changed, 50 insertions(+), 10 deletions(-) create mode 100644 src/components/layout/AdminHeader.tsx diff --git a/src/components/layout/AdminHeader.tsx b/src/components/layout/AdminHeader.tsx new file mode 100644 index 00000000..3f10ff27 --- /dev/null +++ b/src/components/layout/AdminHeader.tsx @@ -0,0 +1,40 @@ +import { Shield, ArrowLeft, Settings } from 'lucide-react'; +import { Button } from '@/components/ui/button'; +import { Link } from 'react-router-dom'; +import { ThemeToggle } from '@/components/theme/ThemeToggle'; +import { AuthButtons } from '@/components/auth/AuthButtons'; + +export function AdminHeader() { + return ( +
+
+ {/* Left Section - Back to main site */} +
+ + +
+ +
+ +

Admin Dashboard

+
+
+ + {/* Right Section - Admin actions */} +
+ + + +
+
+
+ ); +} \ No newline at end of file diff --git a/src/pages/Admin.tsx b/src/pages/Admin.tsx index 42eb32c4..71db9387 100644 --- a/src/pages/Admin.tsx +++ b/src/pages/Admin.tsx @@ -10,6 +10,7 @@ import { ModerationQueue } from '@/components/moderation/ModerationQueue'; import { ReportsQueue } from '@/components/moderation/ReportsQueue'; import { UserRoleManager } from '@/components/moderation/UserRoleManager'; import { ProfileManager } from '@/components/moderation/ProfileManager'; +import { AdminHeader } from '@/components/layout/AdminHeader'; export default function Admin() { const { user, loading: authLoading } = useAuth(); @@ -48,16 +49,14 @@ export default function Admin() { } return ( -
-
-
- -

Admin Dashboard

+ <> + +
+
+

+ Manage content moderation and user roles +

-

- Manage content moderation and user roles -

-
@@ -176,6 +175,7 @@ export default function Admin() { -
+
+ ); } \ No newline at end of file