'use client' import React, { FC } from 'react' import { useTranslation } from 'react-i18next' import cn from 'classnames' export interface ICategoryProps { className?: string list: string[] value: string onChange: (value: string) => void } const Category: FC = ({ className, list, value, onChange }) => { const { t } = useTranslation() const itemClassName = (isSelected: boolean) => cn(isSelected ? 'bg-white text-primary-600 border-gray-200 font-semibold' : 'border-transparent font-medium','flex items-center h-7 px-3 border cursor-pointer rounded-lg') const itemStyle = (isSelected: boolean) => isSelected ? {boxShadow: '0px 1px 2px rgba(16, 24, 40, 0.05)'} : {} return (
onChange('')} > {t('explore.apps.allCategories')}
{list.map(name => (
onChange(name)} > {name}
))}
) } export default React.memo(Category)