39 lines
1.3 KiB
TypeScript
39 lines
1.3 KiB
TypeScript
import { Navigate } from "react-router-dom";
|
|
|
|
import { useLoginPageController } from "../controllers";
|
|
|
|
import { LoginCard } from "./login-card";
|
|
|
|
export function LoginPage() {
|
|
const { loginController, redirectTo, isAuthenticated, isLoading } = useLoginPageController();
|
|
|
|
if (!isLoading && isAuthenticated) {
|
|
return <Navigate replace to={redirectTo} />;
|
|
}
|
|
|
|
return (
|
|
<div className="relative overflow-hidden rounded-[2rem] border border-border/60 bg-gradient-to-br from-background via-background to-muted/50 p-2 shadow-2xl">
|
|
<div
|
|
aria-hidden="true"
|
|
className="pointer-events-none absolute inset-x-8 top-0 h-40 rounded-full bg-primary/8 blur-3xl"
|
|
/>
|
|
|
|
<div className="grid gap-6 rounded-[1.6rem] bg-background/80 p-4 sm:p-6">
|
|
<div className="space-y-2 px-1 pt-1">
|
|
<p className="text-xs font-medium uppercase tracking-[0.24em] text-muted-foreground">
|
|
Identity
|
|
</p>
|
|
<h1 className="text-3xl font-semibold tracking-tight text-foreground">
|
|
Inicio de sesión
|
|
</h1>
|
|
<p className="max-w-sm text-sm text-muted-foreground">
|
|
Nuevo acceso unificado para el frontend ERP.
|
|
</p>
|
|
</div>
|
|
|
|
<LoginCard form={loginController.form} onSubmit={loginController.handleSubmit} />
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|