Skip to content

Commit

Permalink
show only first name in title of group chat ; add title prop when hov…
Browse files Browse the repository at this point in the history
…ering feed items titles
  • Loading branch information
roienatan committed Dec 14, 2023
1 parent b90fc80 commit 0a28e6b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ export const ChatChannelItem: FC<ChatChannelFeedLayoutItemProps> = (props) => {
[],
);

const dmUsersNames = dmUsers?.map((user) => getUserName(user));
const dmUsersNames = dmUsers?.map((user) =>
groupMessage ? user.firstName : getUserName(user),
);
// TODO: need to decide for the maximum amount of users to display. Also decide about the format.
const finalTitle = join(dmUsersNames, " & ");
const groupChatCreatorName = getUserName(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ export const FeedItemBaseContent: FC<FeedItemBaseContentProps> = (props) => {
<div className={styles.content}>
<div className={styles.topContent}>
<p
title={typeof finalTitle === "string" ? finalTitle : undefined}
className={classNames(styles.text, styles.title, {
[styles.titleActive]: isActive,
})}
Expand Down

0 comments on commit 0a28e6b

Please sign in to comment.