Skip to content

Commit 6e69c48

Browse files
authored
Revert "fix(console): update captcha backlink and always show captcha toggle" (#7400)
Revert "fix(console): update captcha backlink and always show captcha toggle …" This reverts commit 21a2ea7.
1 parent 2f8f9d6 commit 6e69c48

File tree

4 files changed

+6
-19
lines changed

4 files changed

+6
-19
lines changed

.changeset/perfect-phones-relax.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

packages/console/src/pages/CaptchaDetails/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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}

packages/console/src/pages/Security/Captcha/EnableCaptcha/index.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,7 @@ import { type RequestError } from '@/hooks/use-api';
1010

1111
import 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>

packages/console/src/pages/Security/Captcha/index.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff 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>

0 commit comments

Comments
 (0)