From c4059d5988825bf545ad6e27ca4cc6a0cea82e41 Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 4 Nov 2025 11:12:18 +0100 Subject: [PATCH] Add /admin redirect page for automatic routing - Navigating to /admin redirects to /admin/dashboard if authenticated - AdminLayoutClient handles auth check and redirects to /admin/login if not authenticated - Shows loading spinner during redirect - Provides clean entry point to admin portal --- app/admin/page.tsx | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 app/admin/page.tsx diff --git a/app/admin/page.tsx b/app/admin/page.tsx new file mode 100644 index 0000000..6ddab89 --- /dev/null +++ b/app/admin/page.tsx @@ -0,0 +1,24 @@ +'use client'; + +import { useEffect } from 'react'; +import { useRouter } from 'next/navigation'; +import { Loader2 } from 'lucide-react'; + +export default function AdminIndex() { + const router = useRouter(); + + useEffect(() => { + // Redirect to dashboard + // The AdminLayoutClient will handle auth check and redirect to login if needed + router.push('/admin/dashboard'); + }, [router]); + + return ( +
+
+ +

Redirecting to admin portal...

+
+
+ ); +}