Compare commits
1 Commits
codex/add-
...
codex/refa
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a0efdb5001 |
@@ -280,10 +280,11 @@ const InitialRouteHandler: React.FC = () => {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Loading state - only wait for onboarding init, not subscription check
|
// Only block on onboarding initialization once we know the user has an active subscription.
|
||||||
// Subscription check is non-blocking and happens in background
|
// This allows no-subscription/inactive flows to continue even when onboarding data is still null.
|
||||||
const waitingForOnboardingInit = loading || !data;
|
const isActiveSubscriber = Boolean(subscription && subscription.active && subscription.plan !== 'none');
|
||||||
if (loading || waitingForOnboardingInit) {
|
const waitingForOnboardingInit = isActiveSubscriber && (loading || !data);
|
||||||
|
if (waitingForOnboardingInit) {
|
||||||
return (
|
return (
|
||||||
<Box
|
<Box
|
||||||
display="flex"
|
display="flex"
|
||||||
@@ -295,7 +296,7 @@ const InitialRouteHandler: React.FC = () => {
|
|||||||
>
|
>
|
||||||
<CircularProgress size={60} />
|
<CircularProgress size={60} />
|
||||||
<Typography variant="h6" color="textSecondary">
|
<Typography variant="h6" color="textSecondary">
|
||||||
{subscriptionLoading ? 'Checking subscription...' : 'Preparing your workspace...'}
|
Preparing your workspace...
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user