"use client"; import { useTranslation } from "react-i18next"; import Field from "@/lib/components/ui/Field"; import Spinner from "@/lib/components/ui/Spinner"; import { PublicBrainItem } from "./components/PublicBrainItem/PublicBrainItem"; import { useBrainsLibrary } from "./hooks/useBrainsLibrary"; const BrainsLibrary = (): JSX.Element => { const { displayingPublicBrains, searchBarText, setSearchBarText, isLoading } = useBrainsLibrary(); const { t } = useTranslation("brain"); return (
setSearchBarText(e.target.value)} name="search" inputClassName="w-max lg:min-w-[300px] md:min-w-[200px] min-w-[100px] mt-10 rounded-3xl bg-white lg:mb-5" placeholder={t("public_brains_search_bar_placeholder")} />
{isLoading && (
)}
{displayingPublicBrains.map((brain) => (
))}
); }; export default BrainsLibrary;