diff --git a/social-messenger-ts/src/components/MessagingChannelPreview/MessagingChannelPreview.css b/social-messenger-ts/src/components/MessagingChannelPreview/MessagingChannelPreview.css index dbe0521b..9b01e3eb 100644 --- a/social-messenger-ts/src/components/MessagingChannelPreview/MessagingChannelPreview.css +++ b/social-messenger-ts/src/components/MessagingChannelPreview/MessagingChannelPreview.css @@ -82,6 +82,10 @@ white-space: nowrap; } +.channel-preview__content-message p { + margin: 0; +} + .channel-preview__container .str-chat__avatar { margin-right: 0; } diff --git a/social-messenger-ts/src/components/MessagingChannelPreview/MessagingChannelPreview.tsx b/social-messenger-ts/src/components/MessagingChannelPreview/MessagingChannelPreview.tsx index 99988cbe..3bf51747 100644 --- a/social-messenger-ts/src/components/MessagingChannelPreview/MessagingChannelPreview.tsx +++ b/social-messenger-ts/src/components/MessagingChannelPreview/MessagingChannelPreview.tsx @@ -51,13 +51,15 @@ type MessagingChannelPreviewProps = ChannelPreviewUIComponentProps & { }; const MessagingChannelPreview = (props: MessagingChannelPreviewProps) => { - const { channel, lastMessage, setActiveChannel, onClick } = props; + const { channel, setActiveChannel, onClick, latestMessage, } = props; const { channel: activeChannel, client } = useChatContext(); const members = Object.values(channel.state.members).filter( ({ user }) => user?.id !== client.userID, ); + + return (
{

{getTimeStamp(channel)}

-

{lastMessage?.text ?? 'Send a message'}

+
{latestMessage}
);