Files
MAD-Platform/app/login/page.tsx
2026-01-20 17:31:34 +01:00

48 lines
1.3 KiB
TypeScript

import { redirect } from 'next/navigation';
import { getCurrentUser } from '@/lib/auth';
import LoginForm from '@/components/LoginForm';
import Image from 'next/image';
export default async function LoginPage() {
const user = await getCurrentUser();
if (user) {
redirect('/dashboard');
}
return (
<div className="min-h-screen flex items-center justify-center bg-cwhite">
<div className="w-full max-w-lg bg-white rounded-3xl shadow-lg py-8 px-12">
{/* Logo */}
<div className="flex justify-center mb-6">
<Image
src="/logo.svg"
alt="MAD Logo"
width={120}
height={120}
priority
/>
</div>
{/* Heading */}
<div className="text-center mb-6">
<h2 className="text-2xl font-bold text-gray-900 mb-2">
Content de vous revoir
</h2>
<p className="text-sm text-gray-600">
Connectez-vous pour accéder à la plateforme.
</p>
</div>
{/* Login Form */}
<LoginForm />
{/* Footer */}
<div className="mt-8 text-center text-xs text-gray-500">
© 2025 MAD - <a href="https://legouix.dev" target="_blank" className="text-lblue hover:text-dblue">Propulsé par LGX</a>
</div>
</div>
</div>
);
}