diff --git a/src/features/auth/components/login-form.tsx b/src/features/auth/components/login-form.tsx index 1f84fe6..18c8d5a 100644 --- a/src/features/auth/components/login-form.tsx +++ b/src/features/auth/components/login-form.tsx @@ -4,6 +4,7 @@ import { useRouter } from "next/navigation"; import { type FormEvent, useEffect, useState } from "react"; import { toast } from "sonner"; import { Button } from "@/shared/components/ui/button"; +import { Checkbox } from "@/shared/components/ui/checkbox"; import { Field, FieldDescription, @@ -38,6 +39,7 @@ export function LoginForm({ const [email, setEmail] = useState(""); const [password, setPassword] = useState(""); + const [rememberMe, setRememberMe] = useState(false); const [error, setError] = useState(""); const [loadingEmail, setLoadingEmail] = useState(false); @@ -60,7 +62,7 @@ export function LoginForm({ email, password, callbackURL: "/dashboard", - rememberMe: false, + rememberMe, }, { onRequest: () => { @@ -186,6 +188,24 @@ export function LoginForm({ /> +
+ setRememberMe(checked === true)} + disabled={loadingEmail || loadingGoogle || loadingPasskey} + className="mt-0.5" + /> +
+ + Manter conectado neste dispositivo + +
+
+