import { useMemo } from 'react'; import { useLocation } from 'react-router-dom'; import { useMediaQuery } from '@librechat/client'; import ManagePrompts from '~/components/Prompts/ManagePrompts'; import { usePromptGroupsContext } from '~/Providers'; import List from '~/components/Prompts/Groups/List'; import PanelNavigation from './PanelNavigation'; import { cn } from '~/utils'; export default function GroupSidePanel({ children, isDetailView, className = '', }: { children?: React.ReactNode; isDetailView?: boolean; className?: string; }) { const location = useLocation(); const isSmallerScreen = useMediaQuery('(max-width: 1024px)'); const isChatRoute = useMemo(() => location.pathname?.startsWith('/c/'), [location.pathname]); const { promptGroups, groupsQuery, nextPage, prevPage, hasNextPage, hasPreviousPage } = usePromptGroupsContext(); return (
{children}
{isChatRoute && }
); }