fix: defer wizard mount until version and tunnel info are both resolved

This commit is contained in:
haorwen
2026-06-21 17:53:04 +08:00
parent 0d5fdebddb
commit 466345b79d
2 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -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",
+4 -2
View File
@@ -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 (
<> <>