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}