import { ActivityIndicator, FlatList, Image, Text, View } from "react-native"; import { SafeAreaView } from "react-native-safe-area-context"; import { RideCard } from "@/components/ride-card"; import { images } from "@/constants"; import { useFetch } from "@/lib/fetch"; import { useSession } from "@/lib/session"; import type { Ride } from "@/types/type"; const Rides = () => { const { user } = useSession(); const { data: recentRides, loading } = useFetch( `/(api)/ride/${user?.id}`, ); return ( } className="px-5" keyboardShouldPersistTaps="handled" contentContainerStyle={{ paddingBottom: 100, }} ListEmptyComponent={ {!loading ? ( <> No recent rides found No recent rides found. ) : ( )} } ListHeaderComponent={ All rides } /> ); }; export default Rides;