fix: Skip onboarding calls in podcast-only demo mode
- Add demoMode utility for consistent demo mode detection - Skip onboarding API calls in OnboardingContext when in demo mode - Redirect to /podcast-maker instead of /onboarding in demo mode
This commit is contained in:
@@ -4,6 +4,7 @@ import { Box, CircularProgress, Typography } from '@mui/material';
|
||||
import { CopilotKit } from "@copilotkit/react-core";
|
||||
import { ClerkProvider, useAuth } from '@clerk/clerk-react';
|
||||
import "@copilotkit/react-ui/styles.css";
|
||||
import { shouldSkipOnboarding } from './utils/demoMode';
|
||||
import Wizard from './components/OnboardingWizard/Wizard';
|
||||
import MainDashboard from './components/MainDashboard/MainDashboard';
|
||||
import SEODashboard from './components/SEODashboard/SEODashboard';
|
||||
@@ -406,6 +407,11 @@ const InitialRouteHandler: React.FC = () => {
|
||||
|
||||
// 4. Has active subscription, check onboarding status
|
||||
if (!isOnboardingComplete) {
|
||||
// In demo mode, skip onboarding and go directly to podcast-maker
|
||||
if (shouldSkipOnboarding()) {
|
||||
console.log('InitialRouteHandler: Demo mode - skipping onboarding → Podcast Maker');
|
||||
return <Navigate to="/podcast-maker" replace />;
|
||||
}
|
||||
console.log('InitialRouteHandler: Subscription active but onboarding incomplete → Onboarding');
|
||||
return <Navigate to="/onboarding" replace />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user