import { Pressable, Text, View } from 'react-native'; import { SafeAreaView } from 'react-native-safe-area-context'; import { Stack } from 'expo-router'; import { useAuthActions } from '@convex-dev/auth/react'; import { useConvexAuth, useQuery } from 'convex/react'; import { api } from '@gib/backend/convex/_generated/api.js'; const Index = () => { const { isAuthenticated, isLoading } = useConvexAuth(); const { signOut } = useAuthActions(); const user = useQuery(api.auth.getUser, isAuthenticated ? {} : 'skip'); return ( Convex Monorepo Your self-hosted Expo + Convex starter {isLoading ? ( Loading... ) : isAuthenticated ? ( Welcome{user?.name ? `, ${user.name}` : ''}! void signOut()} > Sign Out ) : ( Sign in to get started {/* Add sign-in UI here — see apps/next/src/app/(auth)/sign-in for patterns */} )} ); }; export default Index;