fix: if no portalUrl, return a loading tag

This commit is contained in:
Derrick Hammer 2024-03-26 00:59:19 -04:00
parent d5f63490a5
commit 9378a984dd
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 4 additions and 0 deletions

View File

@ -86,6 +86,10 @@ export default function Root() {
}
}, [portalUrl]);
if (!portalUrl) {
return <p>Loading...</p>;
}
const sdk = Sdk.create(portalUrl);
return (
<SdkContextProvider sdk={sdk}>