fix(PostOnHover): add embed thumbnail

This commit is contained in:
plebeius.eth
2023-09-22 14:57:28 +02:00
parent b65784940a
commit 946606ac1f
+8 -1
View File
@@ -94,8 +94,15 @@ const PostOnHover = ({ cid, feed }) => {
<a href={replyMediaInfo.url} target='_blank' rel='noopener noreferrer'> <a href={replyMediaInfo.url} target='_blank' rel='noopener noreferrer'>
{replyMediaInfo?.url.length > 30 ? replyMediaInfo?.url.slice(0, 30) + '(...)' : replyMediaInfo?.url} {replyMediaInfo?.url.length > 30 ? replyMediaInfo?.url.slice(0, 30) + '(...)' : replyMediaInfo?.url}
</a> </a>
&nbsp;({replyMediaInfo?.type}) &nbsp;{replyMediaInfo?.type === 'iframe' ? null : ` (${replyMediaInfo?.type})`}
</div> </div>
{replyMediaInfo?.type === 'iframe' && (
<div className='img-container'>
<span className='file-thumb-reply'>
{replyMediaInfo.thumbnail && <img src={replyMediaInfo.thumbnail} alt='thumbnail' onError={(e) => (e.target.src = fallbackImgUrl)} />}
</span>
</div>
)}
{replyMediaInfo?.type === 'webpage' ? ( {replyMediaInfo?.type === 'webpage' ? (
<div className='img-container'> <div className='img-container'>
<span className='file-thumb-reply'> <span className='file-thumb-reply'>