diff --git a/src/app/admin/login/page.tsx b/src/app/admin/login/page.tsx index 3f72aa0..21a68f7 100644 --- a/src/app/admin/login/page.tsx +++ b/src/app/admin/login/page.tsx @@ -3,6 +3,7 @@ import { Suspense, useState } from "react"; import { signIn } from "next-auth/react"; import { useRouter, useSearchParams } from "next/navigation"; +import { Eye, EyeOff } from "lucide-react"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; @@ -15,6 +16,7 @@ function AdminLoginForm() { const [email, setEmail] = useState(""); const [password, setPassword] = useState(""); + const [showPassword, setShowPassword] = useState(false); const [error, setError] = useState(null); const [loading, setLoading] = useState(false); @@ -53,14 +55,29 @@ function AdminLoginForm() {
- setPassword(e.target.value)} - required - autoComplete="current-password" - /> +
+ setPassword(e.target.value)} + required + autoComplete="current-password" + className="pr-10" + /> + {/* type="button": dentro un
il default è submit, e il toggle + invierebbe le credenziali a ogni click. tabIndex -1 tiene il Tab + sulla sequenza campo → Accedi. */} + +
{error && (

{error}