import { StyleSheet, Text, View } from 'react-native'; import { useEffect, useState } from 'react'; import Request from './Request'; import type { RequestsType } from '../types/requests'; const Requests = ({ userId }: { userId: string }) => { const [requests, setRequests] = useState([]); useEffect(() => { // Convert to a hook with a real api call setRequests([]); }, []); return ( {requests?.length > 0 ? ( {requests.map((request) => ( ))} ) : ( No requests )} ); }; export default Requests; const styles = StyleSheet.create({ requestsContainer: { gap: 10, }, noRequestsText: { fontSize: 20, fontWeight: 'bold', textAlign: 'center', padding: 15, }, });