fix item full embed for the 3rd and final(?) time

This commit is contained in:
k00b 2024-09-30 12:37:33 -05:00
parent 865cdccb2a
commit 861e944fe1
1 changed files with 5 additions and 5 deletions

View File

@ -51,17 +51,17 @@ function BioItem ({ item, handleClick }) {
}
function ItemEmbed ({ url, imgproxyUrls }) {
const provider = parseEmbedUrl(url)
if (provider) {
return <Embed src={url} {...provider} topLevel />
}
if (imgproxyUrls) {
const src = IMGPROXY_URL_REGEXP.test(url) ? decodeProxyUrl(url) : url
const srcSet = imgproxyUrls?.[url]
return <MediaOrLink src={src} srcSet={srcSet} topLevel linkFallback={false} />
}
const provider = parseEmbedUrl(url)
if (provider) {
return <Embed src={url} {...provider} topLevel />
}
return null
}