diff --git a/apps/web/src/shared/components/auth/signup-form.tsx b/apps/web/src/shared/components/auth/signup-form.tsx index 00658485..85027e65 100644 --- a/apps/web/src/shared/components/auth/signup-form.tsx +++ b/apps/web/src/shared/components/auth/signup-form.tsx @@ -14,6 +14,7 @@ import { FormMessage, } from '@/shared/components/ui/form'; import { Input } from '@/shared/components/ui/input'; +import { Checkbox } from '@/shared/components/ui/checkbox'; import { useTranslation } from '@dropit/i18n'; function getFormSchema(t: (key: string) => string) { @@ -23,6 +24,9 @@ function getFormSchema(t: (key: string) => string) { .string() .min(6, { message: t('common.validation.passwordMinLength') }), name: z.string().min(1, { message: t('common.validation.nameRequired') }), + dataConsent: z.boolean().refine((val) => val === true, { + message: t('signup.dataConsent.required'), + }), }); } @@ -30,6 +34,7 @@ type SignupFormData = { email: string; password: string; name: string; + dataConsent: boolean; }; interface SignupFormProps { @@ -57,6 +62,7 @@ export function SignupForm({ email: '', password: '', name: '', + dataConsent: false, }, }); @@ -139,6 +145,34 @@ export function SignupForm({ )} /> + ( + + + + +
+ + {t('signup.dataConsent.prefix')}{' '} + + {t('signup.dataConsent.linkText')} + + + +
+
+ )} + />