frindaddy / mixd

Cocktail portfolio/repository for sharing drink recipes between friends
0 stars 0 forks source link

Dot color changes twice on page swap #19

Closed frindaddy closed 1 month ago

frindaddy commented 11 months ago

The code to randomize the dot color in the logo seems to run twice when the page is refreshed or the user moves to a new page. You can see the dot change colors, then very quickly change again.

I have no idea why this happens

sidezbros commented 11 months ago

I spent a decent amount of time working on this. I made a small patch in v1.3.1 to help address it. The useEffect was dependent on the variable it was changing so it was causing some flashing as it recursively called itself. This change seems to fix the bug listed in this issue so I am marking it as closed. That said, the user can still see the dot changing color after a slight delay when returning from a drink page. This is due to the refresh of App.js and is not easily solved.

frindaddy commented 2 months ago

Fixed on page refresh. Still does not work on page switch (e.g. list to drink entry back to list)

sidezbros commented 1 month ago

The remaining flickering was a side effect of system wide stutter caused by the page reloading on navigation. This has been resolved in PR #50