Only use CAPTCHA in logged out operations and pages (#10607)
Issue #10235 --------- Co-authored-by: ad-elias <elias@autodiligence.com>
This commit is contained in:
@ -1,8 +1,13 @@
|
||||
import React from 'react';
|
||||
|
||||
import { CaptchaProviderScriptLoaderEffect } from '@/captcha/components/CaptchaProviderScriptLoaderEffect';
|
||||
import { isCaptchaRequiredForPath } from '@/captcha/utils/isCaptchaRequiredForPath';
|
||||
|
||||
export const CaptchaProvider = ({ children }: React.PropsWithChildren) => {
|
||||
if (!isCaptchaRequiredForPath(window.location.pathname)) {
|
||||
return <>{children}</>;
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<div id="captcha-widget" data-size="invisible"></div>
|
||||
|
||||
Reference in New Issue
Block a user