From bf980ab89b01f5bdbcb22c43459179bf5cffbe59 Mon Sep 17 00:00:00 2001 From: ajaysi Date: Tue, 31 Mar 2026 14:43:23 +0530 Subject: [PATCH] fix: In demo mode, redirect to podcast-maker when no subscription data --- frontend/src/App.tsx | 42 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index b644d649..6062b431 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -394,10 +394,44 @@ const InitialRouteHandler: React.FC = () => { } // Subscription check completed but returned null/undefined - // This likely means no subscription - redirect to pricing - console.log('InitialRouteHandler: No subscription data after check → Pricing page'); - return ; - } + // In demo mode, allow access to podcast-maker even with no subscription data + if (!subscription) { + if (isOnboardingComplete) { + console.log('InitialRouteHandler: Onboarding complete but no subscription data → Dashboard (allow access)'); + return ; + } + + // Onboarding not complete and no subscription data + // If subscription check is still loading, show loading state + if (subscriptionLoading) { + return ( + + + + Checking subscription... + + + ); + } + + // In demo mode, redirect to podcast-maker even without subscription + if (shouldSkipOnboarding()) { + console.log('InitialRouteHandler: Demo mode - no subscription but allowing access to podcast-maker'); + return ; + } + + // Subscription check completed but returned null/undefined + // This likely means no subscription - redirect to pricing + console.log('InitialRouteHandler: No subscription data after check → Pricing page'); + return ; + } // 3. Check subscription status first const isNewUser = !subscription || subscription.plan === 'none';