fix(popup): show empty message
All checks were successful
Release to Staging / build_and_release (push) Successful in 1m11s

This commit is contained in:
en 2025-02-25 12:28:11 +01:00
parent 9cc98ea6e4
commit 7cfd944abf

View File

@ -451,7 +451,7 @@ export const CommentsPopup = ({ title }: CommentsPopupProps) => {
</button>
</div>
</div>
{commentEvents.length > 0 && (
{commentEvents.length + quoteRepostEvents.length > 0 && (
<>
<h3 className='IBMSMSMBSSCL_CommentNoteRepliesTitle'>
{isNote ? (
@ -504,15 +504,29 @@ export const CommentsPopup = ({ title }: CommentsPopupProps) => {
</span>
</button>
</h3>
<div className='pUMCB_RepliesToPrime'>
{showQuoteReposts
? quoteRepostEvents.map((reply) => (
<Comment key={reply.id} comment={{ event: reply }} />
))
: commentEvents.map((reply) => (
<Comment key={reply.event.id} comment={reply} />
))}
</div>
{(showQuoteReposts
? quoteRepostEvents.length
: commentEvents.length) === 0 && !isLoading ? (
<div className='IBMSMListFeedNoPosts'>
<p>
There are no{' '}
{showQuoteReposts ? 'quote-reposts' : 'replies'} to show
</p>
</div>
) : (
<div className='pUMCB_RepliesToPrime'>
{showQuoteReposts
? quoteRepostEvents.map((reply) => (
<Comment
key={reply.id}
comment={{ event: reply }}
/>
))
: commentEvents.map((reply) => (
<Comment key={reply.event.id} comment={reply} />
))}
</div>
)}
</>
)}
</div>