Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into add_entrypoint
  • Loading branch information
Fluder-Paradyne committed Oct 13, 2023
2 parents 505020d + 696763b commit 5c865f5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 26 deletions.
41 changes: 15 additions & 26 deletions gui/pages/Content/Models/MarketModels.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
<div className="h_calc_sub_60 w_99vw">
{isLoading ? <iframe
id="marketplace_models"
src="https://models.superagi.com/marketplace"
width="100%"
height="100%"
frameBorder="0"
allowFullScreen
></iframe>: <div className="horizontal_container_center h_75vh">
<div>
<div className={`${"h_calc_sub_60"} ${"w_99vw"} ${isLoading ? 'display_none' : 'display_block'}`}>
<iframe
id="marketplace_models"
src="http://localhost:3001/marketplace"
width="100%"
height="100%"
frameBorder="0"
allowFullScreen
></iframe>
</div>
{isLoading && <div className="horizontal_container_center h_75vh">
<div className="signInInfo text_16 ff_sourceCode">{loadingText}</div>
</div>}
</div>
Expand Down
2 changes: 2 additions & 0 deletions gui/pages/_app.css
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 5c865f5

Please sign in to comment.