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