feat(post): add support for static GIFs

This commit is contained in:
Tom (plebeius.eth)
2024-07-20 16:25:20 +02:00
parent b3f0b04e43
commit 7253e4d1a0
39 changed files with 134 additions and 41 deletions
+2 -2
View File
@@ -79,8 +79,8 @@ export const CatalogPostMedia = ({ commentMediaInfo, isOutOfFeed, linkWidth, lin
thumbnailComponent = <img src={thumbnail} alt='' onLoad={handleLoad} onError={handleError} style={loadingStyle} />;
} else if (type === 'iframe' && iframeThumbnail && !hasError) {
thumbnailComponent = <img src={iframeThumbnail} alt='' onLoad={handleLoad} onError={handleError} style={loadingStyle} />;
} else if (type === 'gif' && gifFrameUrl && !hasError) {
thumbnailComponent = <img src={gifFrameUrl} alt='' onLoad={handleLoad} onError={handleError} style={loadingStyle} />;
} else if (type === 'gif' && !hasError) {
thumbnailComponent = <img src={gifFrameUrl || url} alt='' onLoad={handleLoad} onError={handleError} style={loadingStyle} />;
} else if (type === 'audio') {
thumbnailComponent = <audio src={url} controls />;
}