don't show open button for webpage links

This commit is contained in:
plebeius.eth
2024-04-25 16:11:27 +02:00
parent 08a01193fa
commit 5e968ba30d
+2 -1
View File
@@ -37,6 +37,7 @@ const PostDesktop = ({ post, roles, showAllReplies }: PostProps) => {
const commentMediaInfo = getCommentMediaInfo(post);
const { type, url } = commentMediaInfo || {};
const embedUrl = url && new URL(url);
const hasThumbnail = getHasThumbnail(commentMediaInfo, link);
const [showThumbnail, setShowThumbnail] = useState(true);
@@ -76,7 +77,7 @@ const PostDesktop = ({ post, roles, showAllReplies }: PostProps) => {
]
</span>
)}
{showThumbnail && !hasThumbnail && (
{showThumbnail && !hasThumbnail && embedUrl && canEmbed(embedUrl) && (
<span>
{' '}
[