mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-20 02:10:15 +01:00
* style(Header): hide scrollbar but still allow side scroll/swipe/drag/touch * feat: make menu buttons flexiblewith min-width, delete passed in classes, add pointer-cursor * refactor: use conditional for visibility of plugins settings * fix: make advanced settings popover appear over nav * refactor(textarea): minor padding restyling, add max height * style: make menuItem checkmark invisible instead of hidden so it takes up width space * style: make presetsMenu trigger an icon button, remove max-width of presets except in mobile view * style: improve advanced settings mobile styling * feat: newchat and convo items toggle nav on small screens * style: improve no presets view * style: make sure toggle hover effect does not apply on smaller screens
36 lines
894 B
TypeScript
36 lines
894 B
TypeScript
import Convo from './Convo';
|
|
import Conversation from './Conversation';
|
|
import { useLocation } from 'react-router-dom';
|
|
import { TConversation } from 'librechat-data-provider';
|
|
|
|
export default function Conversations({
|
|
conversations,
|
|
moveToTop,
|
|
toggleNav,
|
|
}: {
|
|
conversations: TConversation[];
|
|
moveToTop: () => void;
|
|
toggleNav: () => void;
|
|
}) {
|
|
const location = useLocation();
|
|
const { pathname } = location;
|
|
const ConvoItem = pathname.includes('chat') ? Conversation : Convo;
|
|
|
|
return (
|
|
<>
|
|
{conversations &&
|
|
conversations.length > 0 &&
|
|
conversations.map((convo: TConversation, i) => {
|
|
return (
|
|
<ConvoItem
|
|
key={convo.conversationId}
|
|
conversation={convo}
|
|
retainView={moveToTop}
|
|
toggleNav={toggleNav}
|
|
i={i}
|
|
/>
|
|
);
|
|
})}
|
|
</>
|
|
);
|
|
}
|