Skip to content

Commit

Permalink
fix: remove duplicated category “recommended” (langgenius#10375)
Browse files Browse the repository at this point in the history
  • Loading branch information
hjlarry authored and JunXu01 committed Nov 9, 2024
1 parent abfab84 commit ec7dfb4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/app/components/explore/category.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const Category: FC<ICategoryProps> = ({
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',
Expand All @@ -44,7 +44,7 @@ const Category: FC<ICategoryProps> = ({
<ThumbsUp className='mr-1 w-3.5 h-3.5' />
{t('explore.apps.allCategories')}
</div>
{list.map(name => (
{list.filter(name => name !== allCategoriesEn).map(name => (
<div
key={name}
className={itemClassName(name === value)}
Expand Down

0 comments on commit ec7dfb4

Please sign in to comment.