fix: defer wizard mount until version and tunnel info are both resolved
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "vocechat-web",
|
"name": "vocechat-web",
|
||||||
"version": "0.9.84",
|
"version": "0.9.85",
|
||||||
"homepage": "https://voce.chat",
|
"homepage": "https://voce.chat",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@metamask/onboarding": "^1.0.1",
|
"@metamask/onboarding": "^1.0.1",
|
||||||
|
|||||||
@@ -64,8 +64,10 @@ export default function OnboardingPage() {
|
|||||||
const { data: autoInfo, isLoading: autoInfoLoading } = useGetAutoTunnelInfoQuery(undefined, { skip: !versionOk });
|
const { data: autoInfo, isLoading: autoInfoLoading } = useGetAutoTunnelInfoQuery(undefined, { skip: !versionOk });
|
||||||
const showTunnelStep = versionOk && !!autoInfo && !autoInfo.auto_cftunnel;
|
const showTunnelStep = versionOk && !!autoInfo && !autoInfo.auto_cftunnel;
|
||||||
|
|
||||||
// Wait for autoInfo before rendering Wizard so step count is stable from mount
|
// Wait until we know whether to show the tunnel step before mounting Wizard
|
||||||
if (versionOk && autoInfoLoading) return null;
|
// so step count is stable from mount
|
||||||
|
const ready = currentVersion && (!versionOk || autoInfo !== undefined);
|
||||||
|
if (!ready) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|||||||
Reference in New Issue
Block a user