Something went wrong. Try again.
Effortlessly glide through your todos
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576import { DarkTheme, DefaultTheme, Stack, ThemeProvider } from 'expo-router';import { useColorScheme } from 'react-native';import { GestureHandlerRootView } from 'react-native-gesture-handler';
import { AuthenticatedConvexSync, ClerkAuthProvider, StarterTaskSeed } from '@/auth/clerk';import { Colors } from '@/constants/theme';import { FreeSyncBridge } from '@/data/sync/free-sync';import { RevenueCatBridge } from '@/data/sync/revenuecat';import { useGlideWidgetSync } from '@/widget';
/** * Keeps the home-screen widget in sync with the local task board. Renders * nothing; reads the store directly. No-op off iOS. */function WidgetSync() { useGlideWidgetSync(); return null;}
export default function RootLayout() { const scheme = useColorScheme() === 'dark' ? 'dark' : 'light'; const palette = Colors[scheme]; const base = scheme === 'dark' ? DarkTheme : DefaultTheme; const navTheme = { ...base, colors: { ...base.colors, background: palette.background, card: palette.surface, text: palette.text, border: palette.border, primary: palette.accent, notification: palette.resistance, }, };
return ( <ClerkAuthProvider> <GestureHandlerRootView style={{ flex: 1 }}> <WidgetSync /> <StarterTaskSeed /> <AuthenticatedConvexSync /> <RevenueCatBridge /> <FreeSyncBridge /> <ThemeProvider value={navTheme}> <Stack screenOptions={{ headerShown: false, contentStyle: { backgroundColor: palette.background }, }}> <Stack.Screen name="index" /> {/* Planning is a focused session — full screen, but slides up like the capture sheet. */} <Stack.Screen name="plan" options={{ presentation: 'fullScreenModal', animation: 'slide_from_bottom' }} /> {/* Capture is a quick sheet. */} <Stack.Screen name="new" options={{ presentation: 'modal', animation: 'slide_from_bottom' }} /> {/* Glide-owned auth surface. */} <Stack.Screen name="auth" options={{ presentation: 'modal' }} /> {/* Glide-owned signed-in account surface. */} <Stack.Screen name="profile" options={{ presentation: 'fullScreenModal', animation: 'slide_from_bottom' }} /> {/* Subscription paywall flow: plan → auth → StoreKit payment. */} <Stack.Screen name="paywall" options={{ presentation: 'fullScreenModal', animation: 'slide_from_bottom' }} /> <Stack.Screen name="privacy" options={{ presentation: 'modal' }} /> <Stack.Screen name="support" options={{ presentation: 'modal' }} /> </Stack> </ThemeProvider> </GestureHandlerRootView> </ClerkAuthProvider> );}