Skip to content

Commit e7221ff

Browse files
author
Jaap
committed
add first letter of display name to avatar
1 parent 70c9a1e commit e7221ff

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

src/components/ChannelPreview/ChannelPreviewCompact.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@ const ChannelPreviewCompact = (props) => {
3737
className={`str-chat__channel-preview-compact ${unreadClass} ${activeClass}`}
3838
>
3939
<div className="str-chat__channel-preview-compact--left">
40-
<Avatar image={props.displayImage} size={20} />
40+
<Avatar
41+
image={props.displayImage}
42+
name={props.displayTitle}
43+
size={20}
44+
/>
4145
</div>
4246
<div className="str-chat__channel-preview-compact--right">
4347
{props.displayTitle}

src/components/ChannelPreview/ChannelPreviewLastMessage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const ChannelPreviewLastMessage = (props) => {
3636
{props.unread >= 1 && (
3737
<div className="str-chat__channel-preview--dot" />
3838
)}
39-
<Avatar image={props.displayImage} />
39+
<Avatar image={props.displayImage} name={props.displayTitle} />
4040
<div className="str-chat__channel-preview-info">
4141
<span className="str-chat__channel-preview-title">
4242
{props.displayTitle}

src/components/ChannelPreview/ChannelPreviewMessenger.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,13 @@ const ChannelPreviewMessenger = (props) => {
3636
data-testid="channel-preview-button"
3737
>
3838
<div className="str-chat__channel-preview-messenger--left">
39-
{<Avatar image={props.displayImage} size={40} />}
39+
{
40+
<Avatar
41+
image={props.displayImage}
42+
name={props.displayTitle}
43+
size={40}
44+
/>
45+
}
4046
</div>
4147
<div className="str-chat__channel-preview-messenger--right">
4248
<div className="str-chat__channel-preview-messenger--name">

0 commit comments

Comments
 (0)