From 590f7a0716f11d724b7eca370c871c0bd672e02c Mon Sep 17 00:00:00 2001 From: Zishan Ahmad Date: Thu, 9 May 2024 12:51:41 +0530 Subject: [PATCH] removed showing roles from sidebars --- packages/react/src/components/AllThreads/AllThreads.js | 6 +----- packages/react/src/components/Message/Message.js | 5 ++++- packages/react/src/components/Message/MessageHeader.js | 2 +- .../react/src/components/PinnedMessages/PinnedMessages.js | 1 + .../react/src/components/SearchMessage/SearchMessage.js | 2 +- .../react/src/components/StarredMessages/StarredMessages.js | 1 + 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/packages/react/src/components/AllThreads/AllThreads.js b/packages/react/src/components/AllThreads/AllThreads.js index b04c1469d..72ae9062d 100644 --- a/packages/react/src/components/AllThreads/AllThreads.js +++ b/packages/react/src/components/AllThreads/AllThreads.js @@ -125,11 +125,7 @@ const AllThreads = () => { /> )} - + {message.attachments && message.attachments.length > 0 diff --git a/packages/react/src/components/Message/Message.js b/packages/react/src/components/Message/Message.js index 7466a09b2..8acc5f061 100644 --- a/packages/react/src/components/Message/Message.js +++ b/packages/react/src/components/Message/Message.js @@ -59,6 +59,7 @@ const Message = ({ className = '', style = {}, showToolbox = true, + showRoles = true, }) => { const { classNames, styleOverrides } = useComponentOverrides( 'Message', @@ -183,7 +184,9 @@ const Message = ({ /> )} - {shouldShowHeader && } + {shouldShowHeader && ( + + )} {!message.t ? ( <> diff --git a/packages/react/src/components/Message/MessageHeader.js b/packages/react/src/components/Message/MessageHeader.js index 38acbcaf8..40cf82dc3 100644 --- a/packages/react/src/components/Message/MessageHeader.js +++ b/packages/react/src/components/Message/MessageHeader.js @@ -73,7 +73,7 @@ const MessageHeaderTimestapCss = css` color: #9ea2a8; `; -const MessageHeader = ({ message, isTimeStamped = true, isRoles = true }) => { +const MessageHeader = ({ message, isTimeStamped = true, isRoles = false }) => { const { styleOverrides, classNames } = useComponentOverrides('MessageHeader'); const authenticatedUserId = useUserStore((state) => state.userId); const showRoles = useUserStore((state) => state.showRoles); diff --git a/packages/react/src/components/PinnedMessages/PinnedMessages.js b/packages/react/src/components/PinnedMessages/PinnedMessages.js index 9f1ff78e9..6ecdd2332 100644 --- a/packages/react/src/components/PinnedMessages/PinnedMessages.js +++ b/packages/react/src/components/PinnedMessages/PinnedMessages.js @@ -90,6 +90,7 @@ const PinnedMessages = () => { variant="default" showAvatar showToolbox={false} + showRoles={false} /> ); diff --git a/packages/react/src/components/SearchMessage/SearchMessage.js b/packages/react/src/components/SearchMessage/SearchMessage.js index 4a042a534..f20305685 100644 --- a/packages/react/src/components/SearchMessage/SearchMessage.js +++ b/packages/react/src/components/SearchMessage/SearchMessage.js @@ -1,5 +1,4 @@ import React, { useState, useContext, useEffect } from 'react'; -import { css } from '@emotion/react'; import { isSameDay, format } from 'date-fns'; import { debounce } from 'lodash'; import RCContext from '../../context/RCInstance'; @@ -103,6 +102,7 @@ const Search = () => { variant="default" showAvatar showToolbox={false} + showRoles={false} /> ); diff --git a/packages/react/src/components/StarredMessages/StarredMessages.js b/packages/react/src/components/StarredMessages/StarredMessages.js index 8a07872d1..7abed64ef 100644 --- a/packages/react/src/components/StarredMessages/StarredMessages.js +++ b/packages/react/src/components/StarredMessages/StarredMessages.js @@ -99,6 +99,7 @@ const StarredMessages = () => { variant="default" showAvatar showToolbox={false} + showRoles={false} /> );