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>
|
||
|
|
);
|
||
|
|
}
|