Compare commits

...

2 Commits

Author SHA1 Message Date
Derrick Hammer 056c1de31f
fix: prefix with https 2024-03-26 00:59:51 -04:00
Derrick Hammer 9378a984dd
fix: if no portalUrl, return a loading tag 2024-03-26 00:59:19 -04:00
1 changed files with 5 additions and 1 deletions

View File

@ -78,7 +78,7 @@ export default function Root() {
fetch('/api/meta')
.then(response => response.json())
.then(data => {
setPortalUrl(data.domain);
setPortalUrl(`https://${data.portalUrl}`);
})
.catch((error: any) => {
console.error('Failed to fetch portal url:', error);
@ -86,6 +86,10 @@ export default function Root() {
}
}, [portalUrl]);
if (!portalUrl) {
return <p>Loading...</p>;
}
const sdk = Sdk.create(portalUrl);
return (
<SdkContextProvider sdk={sdk}>