This commit is contained in:
2026-07-08 22:07:59 +02:00
parent 0b2305a3ad
commit 9be9b2987b
10 changed files with 349 additions and 268 deletions

View File

@@ -96,6 +96,7 @@ function RootLayoutInner() {
colorPalette,
signOut,
session,
hasCompletedOnboarding,
isInitializing,
isLoadingPlants,
} = useApp();
@@ -124,7 +125,9 @@ function RootLayoutInner() {
let content = null;
if (isAppReady) {
if (!session) {
// Guests who finished onboarding (e.g. dismissed the soft paywall) browse the
// full app; paid/credit actions are gated at the point of use instead.
if (!session && !hasCompletedOnboarding) {
// Only redirect if we are not already on an auth-related page or the scanner
if (!isAllowedWithoutSession) {
content = <Redirect href="/onboarding" />;