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:
parent
6378c9f991
commit
93fcddc0e3
1 changed files with 2 additions and 2 deletions
|
@ -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 />
|
||||
|
|
Loading…
Add table
Reference in a new issue