From 696763bc72649af35903ad00e875889ff486369f Mon Sep 17 00:00:00 2001 From: namansleeps <122260931+namansleeps@users.noreply.github.com> Date: Thu, 12 Oct 2023 18:33:56 +0530 Subject: [PATCH] marketplace flicker (#1337) --- gui/pages/Content/Models/MarketModels.js | 41 +++++++++--------------- gui/pages/_app.css | 2 ++ 2 files changed, 17 insertions(+), 26 deletions(-) diff --git a/gui/pages/Content/Models/MarketModels.js b/gui/pages/Content/Models/MarketModels.js index 0ffe25ab5..09a717b67 100644 --- a/gui/pages/Content/Models/MarketModels.js +++ b/gui/pages/Content/Models/MarketModels.js @@ -43,35 +43,24 @@ export default function MarketModels(){ useEffect(() => { loadingTextEffect('Loading Models', setLoadingText, 500); setIsLoading(true) - const iframe = document.getElementById('marketplace_models'); - - const handleIframeLoad = () => { - setTimeout(() => { - setIsLoading(false) - }, 2000); - }; - - if (iframe) { - iframe.onload = handleIframeLoad; - } - - return () => { - if (iframe) { - iframe.onload = null; - } - }; + setTimeout(() => { + setIsLoading(false) + }, 2500); }, []); return( -
- {isLoading ? :
+
+
+ +
+ {isLoading &&
{loadingText}
}
diff --git a/gui/pages/_app.css b/gui/pages/_app.css index c949a6721..88e8d2dd3 100644 --- a/gui/pages/_app.css +++ b/gui/pages/_app.css @@ -1138,6 +1138,8 @@ p { .display_flex{display: inline-flex} .display_flex_container{display: flex} +.display_none{display: none} +.display_block{display: block} .align_center{align-items: center} .align_start{align-items: flex-start}