Skip to content

Commit

Permalink
Merge pull request #68 from jamakase/feature/front-basement
Browse files Browse the repository at this point in the history
loader error has been resolved
  • Loading branch information
FanisNgv authored Sep 13, 2024
2 parents 3bce88a + cef26cb commit e116927
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions frontend/src/app/(withSidebar)/conversations/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,12 @@ export default function ConversationPage({
setMessage("");
};

const isPendingRequest = currentConversation &&
currentConversation.length > 0 &&
currentConversation[currentConversation.length - 1].sender === "user" &&
currentConversation[currentConversation.length - 1].text !== null;
const sortedConversation = currentConversation?.sort((a, b) => a.id - b.id);

const isPendingRequest = sortedConversation &&
sortedConversation.length > 0 &&
sortedConversation[sortedConversation.length - 1].sender === "user" &&
sortedConversation[sortedConversation.length - 1].text !== null;

return (
<div className="min-h-full w-full relative overflow-hidden hide-scrollbar">
Expand Down

0 comments on commit e116927

Please sign in to comment.