Added the preload demo experience feature to support presentation mode

This commit is contained in:
shuaiplus
2026-05-04 21:44:10 +08:00
parent e0737006c2
commit 3d95c959f7
2 changed files with 52 additions and 1 deletions
+6 -1
View File
@@ -30,7 +30,7 @@ import {
parseSignalRTextFrames,
readInviteCodeFromUrl,
} from '@/lib/app-support';
import { preloadAuthenticatedWorkspace } from '@/lib/app-preload';
import { preloadAuthenticatedWorkspace, preloadDemoExperience } from '@/lib/app-preload';
import {
bootstrapAppSession,
type CompletedLogin,
@@ -960,6 +960,11 @@ export default function App() {
staleTime: 30_000,
});
useEffect(() => {
if (!IS_DEMO_MODE) return;
return preloadDemoExperience();
}, []);
useEffect(() => {
if (IS_DEMO_MODE) return;
if (phase !== 'app' || !vaultInitialDecryptDone) return;