#Loading screen issue

17 messages · Page 1 of 1 (latest)

runic wraith
#

I added a loading screen to my website using the loading.jsx file. I have a couple of issues with it. First of all, it isn't visible for the first 0.25 seconds. Also, after it goes away I can't scroll my landing/home page. What should I do to fix it?

Here's my loading.jsx code:

export default function Loading() { return ( <div className="loading-screen" > <div className="loading-image-box" > <img src="/images/loading.gif" className="loading-image" alt="Loading Image" /> </div> </div> ) }

lime epochBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

coral pewter
#

First of all, it isn't visible for the first 0.25 seconds
this is probably the time taken for your gif to load. try using only text and not gif, does it show up instantly?

after it goes away I can't scroll my landing/home page
seems like a css issue. can it be scrolled if you remove the loading.js file?

runic wraith
coral pewter
#

that's... weird. does the loading file have any upper-level layout which also fetches data?

coral pewter
#

could you make a minimal reproduction repository?

runic wraith
coral pewter
#

uhm loading.jsx is only applicable when you have expensive fetching in a dynamic server component, in this case it's a static server component so i'm surprised the loading screen even shows up

runic wraith
coral pewter
#

how you implement onAllAssetsLoaded depends on your 3d model tech, i don't know it so can't say much

runic wraith
coral pewter
#

never used it, i don't know, sorry

runic wraith
runic wraith