nnivxix / vilm

Vilm is a web application for finding out the latest film info.

Home Page:https://vilm-react.vercel.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fix the glitched images on home page

nnivxix opened this issue · comments

Hello everyone, I found a bug where the image is a little problematic when running on a mobile device (in my case in Android device)

the problem is happened on mobile device.

For more details, you can watch this video.

reproduce

untitled.mp4

Fixed

The problem is from the component RImage.tsx. I need a state to set the logic when the image has been loaded then stop the operation to set the source of the image. If I don't use whether the state has been loaded or not, infinity looping (set src of image) will occur in the function.

image