2023-08-07 15:13:41 +03:00
|
|
|
import { useTranslation } from "react-i18next";
|
|
|
|
|
2023-07-24 15:17:21 +03:00
|
|
|
import Field from "@/lib/components/ui/Field";
|
|
|
|
|
|
|
|
type BrainSearchBarProps = {
|
|
|
|
searchQuery: string;
|
|
|
|
setSearchQuery: (searchQuery: string) => void;
|
|
|
|
};
|
|
|
|
|
|
|
|
export const BrainSearchBar = ({
|
|
|
|
searchQuery,
|
|
|
|
setSearchQuery,
|
|
|
|
}: BrainSearchBarProps): JSX.Element => {
|
2023-08-07 15:13:41 +03:00
|
|
|
const { t } = useTranslation(["brain"]);
|
|
|
|
|
2023-07-24 15:17:21 +03:00
|
|
|
return (
|
|
|
|
<div className="m-2">
|
|
|
|
<Field
|
|
|
|
name="brainsearch"
|
2023-08-07 15:13:41 +03:00
|
|
|
placeholder={t("searchBrain")}
|
2023-07-24 15:17:21 +03:00
|
|
|
autoFocus
|
|
|
|
autoComplete="off"
|
|
|
|
value={searchQuery}
|
|
|
|
onChange={(e) => setSearchQuery(e.target.value)}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
};
|