0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-06 20:40:08 -05:00

fix(console): hide new protected app type in console guide (#5134)

This commit is contained in:
wangsijie 2023-12-21 11:39:48 +08:00 committed by GitHub
parent 6e82e99725
commit 8a457f3045
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 18 deletions

View file

@ -5,6 +5,7 @@ import { toast } from 'react-hot-toast';
import { useTranslation } from 'react-i18next';
import Modal from 'react-modal';
import { isDevFeaturesEnabled } from '@/consts/env';
import DynamicT from '@/ds-components/DynamicT';
import FormField from '@/ds-components/FormField';
import ModalLayout from '@/ds-components/ModalLayout';
@ -100,7 +101,9 @@ function CreateForm({ defaultCreateType, defaultCreateFrameworkName, onClose }:
type="card"
onChange={onChange}
>
{Object.values(ApplicationType).map((type) => (
{Object.values(ApplicationType)
.filter((value) => isDevFeaturesEnabled || value !== ApplicationType.Protected)
.map((type) => (
<Radio
key={type}
value={type}

View file

@ -89,7 +89,9 @@ function GuideLibrary({ className, hasCardBorder, hasCardButton, hasFilters }: P
<div className={styles.checkboxGroupContainer}>
<CheckboxGroup
className={styles.checkboxGroup}
options={allAppGuideCategories.map((category) => ({
options={allAppGuideCategories
.filter((category) => isDevFeaturesEnabled || category !== 'Protected')
.map((category) => ({
title: `guide.categories.${category}`,
value: category,
}))}