fix: wait for auto tunnel info before rendering wizard to fix missing tunnel step
This commit is contained in:
+1
-1
@@ -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",
|
||||
|
||||
@@ -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 (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user