add close button for videos in replies

This commit is contained in:
plebeius.eth
2024-04-01 21:07:36 +02:00
parent c2f1007d1c
commit b5769eacb3
+10
View File
@@ -58,6 +58,16 @@ const ReplyDesktop = ({ index, reply }: { index: number; reply: Comment }) => {
<a href={link} target='_blank' rel='noopener noreferrer'>
{link.length > 30 ? link.slice(0, 30) + '...' : link}
</a>
{!showThumbnail && (commentMediaInfo?.type === 'iframe' || commentMediaInfo?.type === 'video') && (
<span>
{' '}
[
<span className={styles.closeMedia} onClick={() => setShowThumbnail(true)}>
{t('close')}
</span>
]
</span>
)}
</div>
{hasThumbnail && (
<Media