StatusMedia: stop propagation from element root

This commit is contained in:
Alex Gleason 2022-11-20 12:56:13 -06:00
parent b892b85f70
commit 54801e44af
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -173,7 +173,16 @@ const StatusMedia: React.FC<IStatusMedia> = ({
);
}
return media;
if (media) {
return (
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
<div onClick={e => e.stopPropagation()}>
{media}
</div>
);
} else {
return null;
}
};
export default StatusMedia;