"use client"; import { motion, MotionConfig } from "framer-motion"; import Link from "next/link"; import { useTranslation } from "react-i18next"; import { MdChevronRight } from "react-icons/md"; import { AddBrainModal } from "@/lib/components/AddBrainModal/AddBrainModal"; import Button from "@/lib/components/ui/Button"; import { cn } from "@/lib/utils"; import { BrainListItem } from "./BrainListItem"; import { BrainSearchBar } from "./BrainSearchBar"; import { useBrainsList } from "../hooks/useBrainsList"; export const BrainsList = (): JSX.Element => { const { open, setOpen, searchQuery, setSearchQuery, brains } = useBrainsList(); const { t } = useTranslation("brain"); return ( { if (info.offset.x > 100 && !open) { setOpen(true); } else if (info.offset.x < -100 && open) { setOpen(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) => ( ))}
); };