fix(forms): Naprawa formularza multisplit i dodanie reCAPTCHA v3 do wszystkich formularzy
This commit is contained in:
@@ -125,6 +125,14 @@ export function AwariaClient() {
|
||||
}
|
||||
setIsSubmitting(true);
|
||||
|
||||
let recaptchaToken = '';
|
||||
if (process.env.NEXT_PUBLIC_RECAPTCHA_SITE_KEY) {
|
||||
recaptchaToken = await (window as any).grecaptcha.execute(
|
||||
process.env.NEXT_PUBLIC_RECAPTCHA_SITE_KEY,
|
||||
{ action: 'submit' }
|
||||
);
|
||||
}
|
||||
|
||||
await submitAwariaForm({
|
||||
isUrgent,
|
||||
brand,
|
||||
@@ -139,6 +147,7 @@ export function AwariaClient() {
|
||||
city,
|
||||
preferredDate: '',
|
||||
preferredTime: '',
|
||||
recaptchaToken,
|
||||
});
|
||||
|
||||
setIsSubmitting(false);
|
||||
|
||||
Reference in New Issue
Block a user