"use client"; import { motion, MotionConfig } from "framer-motion"; import Link from "next/link"; import { useTranslation } from "react-i18next"; import { AddBrainModal } from "@/lib/components/AddBrainModal/AddBrainModal"; import Button from "@/lib/components/ui/Button"; import { cn } from "@/lib/utils"; import { BrainListDisplayToggleButton } from "./components/BrainListDisplayToggleButton/BrainListDisplayToggleButton"; import { BrainListItem } from "./components/BrainListItem"; import { BrainSearchBar } from "./components/BrainSearchBar"; import { useBrainsList } from "./hooks/useBrainsList"; export const BrainsList = (): JSX.Element => { const { opened, setOpened, searchQuery, setSearchQuery, brains, isOnBrainsLibraryPage, } = useBrainsList(); const { t } = useTranslation("brain"); return ( { if (info.offset.x > 100 && !opened) { setOpened(true); } else if (info.offset.x < -100 && opened) { setOpened(false); } }} className="flex flex-col lg:sticky fixed top-16 left-0 bottom-0 lg:h-[90vh] overflow-visible z-30 border-r border-black/10 dark:border-white/25 bg-white dark:bg-black" >
{brains.map((brain) => ( ))}
{isOnBrainsLibraryPage ? ( ) : ( )}
); };