mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
load convos on message send & other conditional rendering
This commit is contained in:
parent
2869638cc0
commit
c794287ced
7 changed files with 39 additions and 20 deletions
|
|
@ -1,14 +1,22 @@
|
|||
import React from 'react';
|
||||
import Conversation from './Conversation';
|
||||
|
||||
export default function Conversations() {
|
||||
export default function Conversations({ conversations }) {
|
||||
return (
|
||||
<div className="-mr-2 flex-1 flex-col overflow-y-auto border-b border-white/20">
|
||||
<div className="flex flex-col gap-2 text-sm text-gray-100">
|
||||
<Conversation />
|
||||
<button className="btn btn-dark btn-small m-auto mb-2 flex justify-center gap-2">
|
||||
Show more
|
||||
</button>
|
||||
{conversations &&
|
||||
conversations.map((convo, i) => (
|
||||
<Conversation
|
||||
key={convo.conversationId}
|
||||
title={convo.title}
|
||||
/>
|
||||
))}
|
||||
{conversations && conversations.length >= 12 && (
|
||||
<button className="btn btn-dark btn-small m-auto mb-2 flex justify-center gap-2">
|
||||
Show more
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue