diff --git a/frontend/src/stores/useTenantInitializer.ts b/frontend/src/stores/useTenantInitializer.ts index 24aab966..a5a393da 100644 --- a/frontend/src/stores/useTenantInitializer.ts +++ b/frontend/src/stores/useTenantInitializer.ts @@ -56,12 +56,12 @@ export const useTenantInitializer = () => { const currentTenant = useCurrentTenant(); const { loadUserTenants, setCurrentTenant } = useTenantActions(); - // Load tenants for authenticated users + // Load tenants for authenticated users (but not demo users - they have special initialization below) useEffect(() => { - if (isAuthenticated && !availableTenants) { + if (isAuthenticated && !availableTenants && !isDemoMode) { loadUserTenants(); } - }, [isAuthenticated, availableTenants, loadUserTenants]); + }, [isAuthenticated, availableTenants, loadUserTenants, isDemoMode]); // Set up mock tenant for demo mode with appropriate subscription tier useEffect(() => {