mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-12 04:58:59 +08:00
fix: remove duplicated category “recommended” (#10375)
This commit is contained in:
parent
1e8457441d
commit
3cb2fb8250
@ -28,7 +28,7 @@ const Category: FC<ICategoryProps> = ({
|
|||||||
allCategoriesEn,
|
allCategoriesEn,
|
||||||
}) => {
|
}) => {
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
const isAllCategories = !list.includes(value as AppCategory)
|
const isAllCategories = !list.includes(value as AppCategory) || value === allCategoriesEn
|
||||||
|
|
||||||
const itemClassName = (isSelected: boolean) => cn(
|
const itemClassName = (isSelected: boolean) => cn(
|
||||||
'flex items-center px-3 py-[7px] h-[32px] rounded-lg border-[0.5px] border-transparent text-gray-700 font-medium leading-[18px] cursor-pointer hover:bg-gray-200',
|
'flex items-center px-3 py-[7px] h-[32px] rounded-lg border-[0.5px] border-transparent text-gray-700 font-medium leading-[18px] cursor-pointer hover:bg-gray-200',
|
||||||
@ -44,7 +44,7 @@ const Category: FC<ICategoryProps> = ({
|
|||||||
<ThumbsUp className='mr-1 w-3.5 h-3.5' />
|
<ThumbsUp className='mr-1 w-3.5 h-3.5' />
|
||||||
{t('explore.apps.allCategories')}
|
{t('explore.apps.allCategories')}
|
||||||
</div>
|
</div>
|
||||||
{list.map(name => (
|
{list.filter(name => name !== allCategoriesEn).map(name => (
|
||||||
<div
|
<div
|
||||||
key={name}
|
key={name}
|
||||||
className={itemClassName(name === value)}
|
className={itemClassName(name === value)}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user