fix: remove duplicated category “recommended” (#10375)
Some checks are pending
Build and Push API & Web / build (api, DIFY_API_IMAGE_NAME, linux/amd64, build-api-amd64) (push) Waiting to run
Build and Push API & Web / build (api, DIFY_API_IMAGE_NAME, linux/arm64, build-api-arm64) (push) Waiting to run
Build and Push API & Web / build (web, DIFY_WEB_IMAGE_NAME, linux/amd64, build-web-amd64) (push) Waiting to run
Build and Push API & Web / build (web, DIFY_WEB_IMAGE_NAME, linux/arm64, build-web-arm64) (push) Waiting to run
Build and Push API & Web / create-manifest (api, DIFY_API_IMAGE_NAME, merge-api-images) (push) Blocked by required conditions
Build and Push API & Web / create-manifest (web, DIFY_WEB_IMAGE_NAME, merge-web-images) (push) Blocked by required conditions

This commit is contained in:
非法操作 2024-11-06 19:06:55 +08:00 committed by GitHub
parent 1e8457441d
commit 3cb2fb8250
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)}