add terms page + code refactor

This commit is contained in:
smanylov
2025-12-10 11:42:52 +07:00
parent 2ff5b636c0
commit d9c26b079d
6 changed files with 18 additions and 9 deletions
+9 -1
View File
@@ -4,6 +4,7 @@ import styles from '@/app/styles/login.module.scss';
import { useActionState } from 'react';
import { registration } from '@/app/actions/auth';
import PhoneInput from '@/app/ui/inputs/phone-input';
import Link from 'next/link';
export default function RegisterForm() {
const [state, formAction, isPending] = useActionState(
@@ -107,7 +108,14 @@ export default function RegisterForm() {
name="agree"
defaultChecked={state?.previousState?.agree ? true : false}
/>
<label htmlFor="agree">Я соглашаюсь с <a href="/" >условиями использования и политикой конфиденциальности</a></label>
<label htmlFor="agree">Я соглашаюсь с
<Link
href="/terms-and-privacy-policy"
target="_blank"
>
условиями использования и политикой конфиденциальности
</Link>
</label>
</div>
{state?.error?.agree && (
<p className="text-sm text-red-500">{state?.error?.agree}</p>