Compare commits
2 Commits
d5f63490a5
...
056c1de31f
Author | SHA1 | Date |
---|---|---|
Derrick Hammer | 056c1de31f | |
Derrick Hammer | 9378a984dd |
|
@ -78,7 +78,7 @@ export default function Root() {
|
||||||
fetch('/api/meta')
|
fetch('/api/meta')
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
setPortalUrl(data.domain);
|
setPortalUrl(`https://${data.portalUrl}`);
|
||||||
})
|
})
|
||||||
.catch((error: any) => {
|
.catch((error: any) => {
|
||||||
console.error('Failed to fetch portal url:', error);
|
console.error('Failed to fetch portal url:', error);
|
||||||
|
@ -86,6 +86,10 @@ export default function Root() {
|
||||||
}
|
}
|
||||||
}, [portalUrl]);
|
}, [portalUrl]);
|
||||||
|
|
||||||
|
if (!portalUrl) {
|
||||||
|
return <p>Loading...</p>;
|
||||||
|
}
|
||||||
|
|
||||||
const sdk = Sdk.create(portalUrl);
|
const sdk = Sdk.create(portalUrl);
|
||||||
return (
|
return (
|
||||||
<SdkContextProvider sdk={sdk}>
|
<SdkContextProvider sdk={sdk}>
|
||||||
|
|
Loading…
Reference in New Issue