Files
MAD-Platform/app/login/page.tsx

48 lines
1.3 KiB
TypeScript
Raw Normal View History

2026-01-20 17:20:13 +01:00
import { redirect } from 'next/navigation';
2026-01-20 17:31:34 +01:00
import { getCurrentUser } from '@/lib/auth';
2026-01-20 17:20:13 +01:00
import LoginForm from '@/components/LoginForm';
2026-01-20 17:31:34 +01:00
import Image from 'next/image';
2026-01-20 17:20:13 +01:00
export default async function LoginPage() {
const user = await getCurrentUser();
if (user) {
redirect('/dashboard');
}
return (
2026-01-20 17:31:34 +01:00
<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
2026-01-20 17:20:13 +01:00
</h2>
2026-01-20 17:31:34 +01:00
<p className="text-sm text-gray-600">
Connectez-vous pour accéder à la plateforme.
2026-01-20 17:20:13 +01:00
</p>
</div>
2026-01-20 17:31:34 +01:00
{/* Login Form */}
2026-01-20 17:20:13 +01:00
<LoginForm />
2026-01-20 17:31:34 +01:00
{/* 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>
2026-01-20 17:20:13 +01:00
</div>
</div>
);
}