Skip to content

Commit

Permalink
removed showing roles from sidebars
Browse files Browse the repository at this point in the history
  • Loading branch information
Spiral-Memory committed May 9, 2024
1 parent 2ef51f9 commit 590f7a0
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
6 changes: 1 addition & 5 deletions packages/react/src/components/AllThreads/AllThreads.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,7 @@ const AllThreads = () => {
/>
)}
<MessageBodyContainer>
<MessageHeader
message={message}
isTimeStamped={false}
isRoles={false}
/>
<MessageHeader message={message} isTimeStamped={false} />

<MessageBody>
{message.attachments && message.attachments.length > 0
Expand Down
5 changes: 4 additions & 1 deletion packages/react/src/components/Message/Message.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ const Message = ({
className = '',
style = {},
showToolbox = true,
showRoles = true,
}) => {
const { classNames, styleOverrides } = useComponentOverrides(
'Message',
Expand Down Expand Up @@ -183,7 +184,9 @@ const Message = ({
/>
)}
<MessageBodyContainer>
{shouldShowHeader && <MessageHeader message={message} />}
{shouldShowHeader && (
<MessageHeader message={message} isRoles={showRoles} />
)}
{!message.t ? (
<>
<MessageBody css={message.isPending && PendingMessageBody}>
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/Message/MessageHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ const PinnedMessages = () => {
variant="default"
showAvatar
showToolbox={false}
showRoles={false}
/>
</Box>
);
Expand Down
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -103,6 +102,7 @@ const Search = () => {
variant="default"
showAvatar
showToolbox={false}
showRoles={false}
/>
</Box>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ const StarredMessages = () => {
variant="default"
showAvatar
showToolbox={false}
showRoles={false}
/>
</Box>
);
Expand Down

0 comments on commit 590f7a0

Please sign in to comment.