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() {
71
71
72
72
return (
73
73
< DetailsPage
74
- backLink = "/security/captcha "
74
+ backLink = "/security"
75
75
backLinkTitle = "security.captcha_details.back_to_security"
76
76
isLoading = { isLoading }
77
77
error = { error }
Original file line number Diff line number Diff line change @@ -10,12 +10,7 @@ import { type RequestError } from '@/hooks/use-api';
10
10
11
11
import styles from './index.module.scss' ;
12
12
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 ( ) {
19
14
const { t } = useTranslation ( undefined , { keyPrefix : 'admin_console' } ) ;
20
15
const { register, reset } = useFormContext < CaptchaPolicy > ( ) ;
21
16
const { data, isLoading } = useSWR < SignInExperience , RequestError > ( 'api/sign-in-exp' ) ;
@@ -37,7 +32,6 @@ function EnableCaptcha({ disabled }: Props) {
37
32
< Switch
38
33
label = { t ( 'security.bot_protection.enable_captcha_description' ) }
39
34
{ ...register ( 'enabled' ) }
40
- disabled = { disabled }
41
35
/>
42
36
</ div >
43
37
</ FormField >
Original file line number Diff line number Diff line change @@ -105,7 +105,10 @@ function Captcha() {
105
105
{ t ( 'security.bot_protection.captcha.placeholder' ) }
106
106
</ div >
107
107
{ data && ! isFreeTenant ? (
108
- < CaptchaCard captchaProvider = { data } />
108
+ < >
109
+ < CaptchaCard captchaProvider = { data } />
110
+ < EnableCaptcha />
111
+ </ >
109
112
) : (
110
113
< Button
111
114
title = "security.bot_protection.captcha.add"
@@ -116,7 +119,6 @@ function Captcha() {
116
119
} }
117
120
/>
118
121
) }
119
- < EnableCaptcha disabled = { isFreeTenant || ! data } />
120
122
</ FormField >
121
123
</ FormCard >
122
124
</ DetailsForm >
You can’t perform that action at this time.
0 commit comments