put the logic where it belongs to
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
b3ac044546
commit
affbe86081
2 changed files with 2 additions and 2 deletions
|
@ -34,7 +34,7 @@ const StillImage: React.FC<IStillImage> = ({
|
||||||
const img = useRef<HTMLImageElement>(null);
|
const img = useRef<HTMLImageElement>(null);
|
||||||
|
|
||||||
const hoverToPlay = (
|
const hoverToPlay = (
|
||||||
src && !autoPlayGif && ((isGif && !src.endsWith('.png')) || src.endsWith('.gif') || src.startsWith('blob:'))
|
src && !autoPlayGif && ((isGif) || src.endsWith('.gif') || src.startsWith('blob:'))
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleImageLoad = () => {
|
const handleImageLoad = () => {
|
||||||
|
|
|
@ -28,7 +28,7 @@ const Emoji: React.FC<IEmoji> = (props): JSX.Element | null => {
|
||||||
<StillImage
|
<StillImage
|
||||||
alt={alt || emoji}
|
alt={alt || emoji}
|
||||||
src={src}
|
src={src}
|
||||||
isGif
|
isGif={!src.endsWith('.png')}
|
||||||
noGroup={noGroup}
|
noGroup={noGroup}
|
||||||
letterboxed
|
letterboxed
|
||||||
{...rest}
|
{...rest}
|
||||||
|
|
Loading…
Reference in a new issue