Fix: Do not Show "Reply" button in the toolbox for replies since we only support one level of replies. (#5748)

This commit is contained in:
Sachin Chaurasiya 2022-06-29 21:00:40 +05:30 committed by GitHub
parent 67c4493892
commit e9b6de9fa4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 10 deletions

View File

@ -75,7 +75,7 @@ const PopoverContent: FC<Props> = ({
* if on reply method is undefined then get the panel element * if on reply method is undefined then get the panel element
* and scroll to the bottom * and scroll to the bottom
*/ */
if (isUndefined(onReply)) { if (isUndefined(onReply) && isThread) {
const feedPanel = document.getElementById('feed-panel') as HTMLElement; const feedPanel = document.getElementById('feed-panel') as HTMLElement;
const threadPanel = document.getElementById( const threadPanel = document.getElementById(
'thread-panel' 'thread-panel'
@ -152,14 +152,16 @@ const PopoverContent: FC<Props> = ({
</button> </button>
</Popover> </Popover>
<button onClick={handleReply}> {(onReply || isThread) && (
<SVGIcons <button onClick={handleReply}>
alt="add-reply" <SVGIcons
icon={Icons.ADD_REPLY} alt="add-reply"
title="Reply" icon={Icons.ADD_REPLY}
width="20px" title="Reply"
/> width="20px"
</button> />
</button>
)}
{deleteButtonCheck ? ( {deleteButtonCheck ? (
<button onClick={handleDelete}> <button onClick={handleDelete}>

View File

@ -90,7 +90,7 @@ const ProfilePicture = ({
return profilePic ? ( return profilePic ? (
<div <div
className={classNames('profile-image', type)} className={classNames('profile-image', type, className)}
style={{ height: `${height || width}px`, width: `${width}px` }}> style={{ height: `${height || width}px`, width: `${width}px` }}>
<img <img
alt="user" alt="user"