From 3cb2fb82504e0b738301e57b9b60c282912ee557 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=9E=E6=B3=95=E6=93=8D=E4=BD=9C?= Date: Wed, 6 Nov 2024 19:06:55 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20remove=20duplicated=20category=20?= =?UTF-8?q?=E2=80=9Crecommended=E2=80=9D=20(#10375)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/app/components/explore/category.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/app/components/explore/category.tsx b/web/app/components/explore/category.tsx index cbf6cd26fe..8f67f0fd49 100644 --- a/web/app/components/explore/category.tsx +++ b/web/app/components/explore/category.tsx @@ -28,7 +28,7 @@ const Category: FC = ({ allCategoriesEn, }) => { const { t } = useTranslation() - const isAllCategories = !list.includes(value as AppCategory) + const isAllCategories = !list.includes(value as AppCategory) || value === allCategoriesEn 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', @@ -44,7 +44,7 @@ const Category: FC = ({ {t('explore.apps.allCategories')} - {list.map(name => ( + {list.filter(name => name !== allCategoriesEn).map(name => (