All checks were successful
Build and Push Docker Images / docker (push) Successful in 2m35s
- 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
25 lines
730 B
TypeScript
25 lines
730 B
TypeScript
'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 (
|
|
<div className="min-h-screen flex items-center justify-center bg-sail-white">
|
|
<div className="text-center">
|
|
<Loader2 className="w-8 h-8 text-deep-sea-blue animate-spin mx-auto mb-4" />
|
|
<p className="text-deep-sea-blue/70 font-medium">Redirecting to admin portal...</p>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|