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