2025-12-12 13:13:07 +01:00
|
|
|
import {
|
|
|
|
|
maybeApplyDefenderCaptcha,
|
|
|
|
|
maybeApplyWordfenceCaptcha,
|
|
|
|
|
} from './captcha'
|
2025-08-27 08:44:30 +02:00
|
|
|
|
|
|
|
|
export const formPreSubmitHook = (form) =>
|
|
|
|
|
new Promise((res) => {
|
|
|
|
|
if (maybeApplyWordfenceCaptcha(res, form)) {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-12 13:13:07 +01:00
|
|
|
if (maybeApplyDefenderCaptcha(res, form)) {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
2025-08-27 08:44:30 +02:00
|
|
|
res()
|
|
|
|
|
})
|