mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
perf(media): restrict gif frame extraction to gif media types
This commit is contained in:
@@ -543,7 +543,7 @@ const PostMedia = ({
|
||||
const { t } = useTranslation();
|
||||
const { url } = commentMediaInfo || {};
|
||||
let type = commentMediaInfo?.type;
|
||||
const gifFrameUrl = useFetchGifFirstFrame(url);
|
||||
const gifFrameUrl = useFetchGifFirstFrame(type === 'gif' ? url : undefined);
|
||||
const directories = useDirectories();
|
||||
|
||||
if (type === 'gif' && gifFrameUrl !== null) {
|
||||
|
||||
Reference in New Issue
Block a user