fix: wait for auto tunnel info before rendering wizard to fix missing tunnel step

This commit is contained in:
haorwen
2026-06-21 17:01:28 +08:00
parent 30451f4b3e
commit 0d5fdebddb
2 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "vocechat-web",
"version": "0.9.81",
"version": "0.9.84",
"homepage": "https://voce.chat",
"dependencies": {
"@metamask/onboarding": "^1.0.1",
+5 -2
View File
@@ -61,8 +61,11 @@ export default function OnboardingPage() {
const [serverName, setServerName] = useState("");
const currentVersion = useAppSelector((store) => store.server.version, shallowEqual);
const versionOk = !!currentVersion && compareVersion(currentVersion, TUNNEL_MIN_VERSION) >= 0;
const { data: autoInfo } = useGetAutoTunnelInfoQuery(undefined, { skip: !versionOk });
const showTunnelStep = versionOk && (autoInfo ? !autoInfo.auto_cftunnel : false);
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;
return (
<>