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