From 8818d5364e0ff42974c7fe1aa33dd7ee0cdd081e Mon Sep 17 00:00:00 2001 From: openhands Date: Tue, 7 Jul 2026 19:03:33 +0200 Subject: [PATCH] Replace checkbox with React state-driven toggle for reliable terms acceptance --- src/components/auth/register-form.tsx | 34 ++++++++++++++++++--------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/src/components/auth/register-form.tsx b/src/components/auth/register-form.tsx index 39c38f77..d994e29a 100644 --- a/src/components/auth/register-form.tsx +++ b/src/components/auth/register-form.tsx @@ -1,6 +1,6 @@ "use client"; -import { useActionState } from "react"; +import { useActionState, useState } from "react"; import Link from "next/link"; import { useTranslations } from "next-intl"; import { register } from "@/actions/register"; @@ -19,6 +19,7 @@ export function RegisterForm({ const t = useTranslations("pages.register"); const showCaptcha = captcha.provider !== "none" && !!captcha.siteKey; const [serverError, formAction, isPending] = useActionState(register, null); + const [termsAccepted, setTermsAccepted] = useState(false); return (
@@ -154,18 +155,29 @@ export function RegisterForm({
-
{/* Captcha */}