Skip to content

Commit

Permalink
skip label display for empty groups
Browse files Browse the repository at this point in the history
  • Loading branch information
tdraier committed Nov 26, 2024
1 parent 7de778e commit b6c86af
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ const Content = () => {
<ScrollArea className="h-[80vh]">
{Object.keys(conversationsByDate).map((dateLabel) => (
<>
<DropdownMenuLabel label={dateLabel} />
{conversationsByDate[dateLabel as GroupLabel].length > 0 && (
<DropdownMenuLabel label={dateLabel} />
)}
{conversationsByDate[dateLabel as GroupLabel].map((conversation) => (
<DropdownMenuItem
key={conversation.sId}
Expand Down

0 comments on commit b6c86af

Please sign in to comment.