fix thumbnailUrl values in catalog

This commit is contained in:
Tom
2023-05-02 15:43:00 +02:00
parent 3c7661ed1a
commit 48075d4c1f
+8 -5
View File
@@ -417,15 +417,18 @@ const Catalog = () => {
{commentMediaInfo?.url ? ( {commentMediaInfo?.url ? (
<Fragment key="f-catalog"> <Fragment key="f-catalog">
{commentMediaInfo?.type === "webpage" ? ( {commentMediaInfo?.type === "webpage" ? (
<img key={`img-${index}`} alt="thread" thread.thumbnailUrl ? (
src={commentMediaInfo.url} <img key={`img-${index}`}
src={commentMediaInfo.thumbnail} alt={commentMediaInfo.type}
onError={(e) => { onError={(e) => {
e.target.src = fallbackImgUrl e.target.src = fallbackImgUrl
e.target.onerror = null;}} /> e.target.onerror = null;
}} />
) : null
) : null} ) : null}
{commentMediaInfo?.type === "image" ? ( {commentMediaInfo?.type === "image" ? (
<img key={`img-${index}`} alt="thread" <img key={`img-${index}`}
src={commentMediaInfo.url} src={commentMediaInfo.url} alt={commentMediaInfo.type}
onError={(e) => { onError={(e) => {
e.target.src = fallbackImgUrl e.target.src = fallbackImgUrl
e.target.onerror = null;}} /> e.target.onerror = null;}} />