File tree Expand file tree Collapse file tree 4 files changed +6
-19
lines changed
packages/console/src/pages Expand file tree Collapse file tree 4 files changed +6
-19
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ function CaptchaDetails() {
7171
7272 return (
7373 < DetailsPage
74- backLink = "/security/captcha "
74+ backLink = "/security"
7575 backLinkTitle = "security.captcha_details.back_to_security"
7676 isLoading = { isLoading }
7777 error = { error }
Original file line number Diff line number Diff line change @@ -10,12 +10,7 @@ import { type RequestError } from '@/hooks/use-api';
1010
1111import styles from './index.module.scss' ;
1212
13- type Props = {
14- // eslint-disable-next-line react/boolean-prop-naming
15- readonly disabled ?: boolean ;
16- } ;
17-
18- function EnableCaptcha ( { disabled } : Props ) {
13+ function EnableCaptcha ( ) {
1914 const { t } = useTranslation ( undefined , { keyPrefix : 'admin_console' } ) ;
2015 const { register, reset } = useFormContext < CaptchaPolicy > ( ) ;
2116 const { data, isLoading } = useSWR < SignInExperience , RequestError > ( 'api/sign-in-exp' ) ;
@@ -37,7 +32,6 @@ function EnableCaptcha({ disabled }: Props) {
3732 < Switch
3833 label = { t ( 'security.bot_protection.enable_captcha_description' ) }
3934 { ...register ( 'enabled' ) }
40- disabled = { disabled }
4135 />
4236 </ div >
4337 </ FormField >
Original file line number Diff line number Diff line change @@ -105,7 +105,10 @@ function Captcha() {
105105 { t ( 'security.bot_protection.captcha.placeholder' ) }
106106 </ div >
107107 { data && ! isFreeTenant ? (
108- < CaptchaCard captchaProvider = { data } />
108+ < >
109+ < CaptchaCard captchaProvider = { data } />
110+ < EnableCaptcha />
111+ </ >
109112 ) : (
110113 < Button
111114 title = "security.bot_protection.captcha.add"
@@ -116,7 +119,6 @@ function Captcha() {
116119 } }
117120 />
118121 ) }
119- < EnableCaptcha disabled = { isFreeTenant || ! data } />
120122 </ FormField >
121123 </ FormCard >
122124 </ DetailsForm >
You can’t perform that action at this time.
0 commit comments