import { IconX } from '@tabler/icons-react'; import { useTranslation } from 'next-i18next'; import { FC } from 'react'; interface Props { placeholder: string; searchTerm: string; onSearch: (searchTerm: string) => void; } export const Search: FC = ({ placeholder, searchTerm, onSearch }) => { const { t } = useTranslation('sidebar'); const handleSearchChange = (e: React.ChangeEvent) => { onSearch(e.target.value); }; const clearSearch = () => { onSearch(''); }; return (
{searchTerm && ( )}
); };