RiiConnect24 / RiiTag-Next

A customizable Gamertag for Wii, Wii U and more! Now powered by Next.js.
https://tag.rc24.xyz
GNU Affero General Public License v3.0
15 stars 12 forks source link

Spaghetti in backgrounds form, implement lazy loading #46

Open unclamped opened 10 months ago

unclamped commented 10 months ago

While reviewing #12 and coming up with my own solution, I stumbled across file https://github.com/RiiConnect24/RiiTag-Next/blob/master/src/lib/constants/forms/backgrounds.js. It seems like the background selector in the RiiTag control panel is directly loading all backgrounds at once, from a predefined list. This could be improved in the future to recursively search the backgrounds folder, which would not only clean up the code a bit, but would also allow for seamless display of new backgrounds, such as custom ones as indicated in #12.