Skip to content

Commit

Permalink
fix: add missing PinIndicator placeholder (#2352)
Browse files Browse the repository at this point in the history
### 🎯 Goal

This PR adds missing `PinIndicator` placeholder and
`str-chat__message--pinned` class name to a `MessageSimple` component.
  • Loading branch information
arnautov-anton committed Apr 3, 2024
1 parent 5bbcb24 commit e059af8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/Message/MessageSimple.tsx
Expand Up @@ -85,6 +85,7 @@ const MessageSimpleWithContext = <
MessageTimestamp = DefaultMessageTimestamp,
ReactionSelector = DefaultReactionSelector,
ReactionsList = DefaultReactionList,
PinIndicator,
} = useComponentContext<StreamChatGenerics>('MessageSimple');
const { themeVersion } = useChatContext('MessageSimple');

Expand Down Expand Up @@ -132,9 +133,9 @@ const MessageSimpleWithContext = <
: 'str-chat__message--other',
message.text ? 'str-chat__message--has-text' : 'has-no-text',
{
'pinned-message': message.pinned,
'str-chat__message--has-attachment': hasAttachment,
'str-chat__message--highlighted': highlighted,
'str-chat__message--pinned pinned-message': message.pinned,
'str-chat__message--with-reactions str-chat__message-with-thread-link': canShowReactions,
'str-chat__message-send-can-be-retried':
message?.status === 'failed' && message?.errorStatusCode !== 403,
Expand Down Expand Up @@ -167,6 +168,7 @@ const MessageSimpleWithContext = <
)}
{
<div className={rootClassName} key={message.id}>
{PinIndicator && <PinIndicator />}
{themeVersion === '1' && <MessageStatus />}
{message.user && (
<Avatar
Expand Down

0 comments on commit e059af8

Please sign in to comment.