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 ? (
<Fragment key="f-catalog">
{commentMediaInfo?.type === "webpage" ? (
<img key={`img-${index}`} alt="thread"
src={commentMediaInfo.url}
thread.thumbnailUrl ? (
<img key={`img-${index}`}
src={commentMediaInfo.thumbnail} alt={commentMediaInfo.type}
onError={(e) => {
e.target.src = fallbackImgUrl
e.target.onerror = null;}} />
e.target.onerror = null;
}} />
) : null
) : null}
{commentMediaInfo?.type === "image" ? (
<img key={`img-${index}`} alt="thread"
src={commentMediaInfo.url}
<img key={`img-${index}`}
src={commentMediaInfo.url} alt={commentMediaInfo.type}
onError={(e) => {
e.target.src = fallbackImgUrl
e.target.onerror = null;}} />