0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-04-14 23:11:31 -05:00

refactor: remove unnecessary error condition checks

This commit is contained in:
Charles Zhao 2025-04-07 15:46:44 +08:00
parent 6378c9f991
commit 93fcddc0e3
No known key found for this signature in database
GPG key ID: 55CFA7C080C98029

View file

@ -31,7 +31,7 @@ function Security() {
const { guideId } = useParams();
const { t } = useTranslation(undefined, { keyPrefix: 'admin_console' });
const [isCreateCaptchaFormOpen, setIsCreateCaptchaFormOpen] = useState(false);
const { data, error, isLoading } = useDataFetch();
const { data, isLoading } = useDataFetch();
const formMethods = useForm<CaptchaPolicy>({
defaultValues: {
enabled: false,
@ -98,7 +98,7 @@ function Security() {
<div className={styles.description}>
{t('security.bot_protection.captcha.placeholder')}
</div>
{data && (!error || error.status !== 404) ? (
{data ? (
<>
<CaptchaCard captchaProvider={data} />
<EnableCaptcha />