From 19f33f332cac12a26c85fddaecf8fb08a5eafc71 Mon Sep 17 00:00:00 2001 From: Devin Binnie <52460000+devinbinnie@users.noreply.github.com> Date: Fri, 9 Jun 2023 13:01:41 -0400 Subject: [PATCH] [MM-52627] Only show the team/channel name on search items in the RHS (#23649) * [MM-52627] Only show the team/channel name on search items in the RHS * Remove additional date separator * PR feedback --- webapp/channels/src/components/post/post_component.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/webapp/channels/src/components/post/post_component.tsx b/webapp/channels/src/components/post/post_component.tsx index 514cd96c85..5533f753ac 100644 --- a/webapp/channels/src/components/post/post_component.tsx +++ b/webapp/channels/src/components/post/post_component.tsx @@ -513,7 +513,7 @@ const PostComponent = (props: Props): JSX.Element => { className={props.location === 'SEARCH' ? 'search-item__container' : undefined} data-testid={props.location === 'SEARCH' ? 'search-item-container' : undefined} > - {(isSearchResultItem || (props.location !== Locations.CENTER && props.isPinnedPosts) || props.isFlagged) && } + {(isSearchResultItem || (props.location !== Locations.CENTER && (props.isPinnedPosts || props.isFlaggedPosts))) && } { className='search-channel__name__container' aria-hidden='true' > + {Boolean(isSearchResultItem) && {channelDisplayName} + } {props.channelIsArchived && @@ -543,7 +545,7 @@ const PostComponent = (props: Props): JSX.Element => { /> } - {Boolean(props.teamDisplayName) && + {Boolean(isSearchResultItem) && Boolean(props.teamDisplayName) && {props.teamDisplayName}