import { FontAwesome } from '@expo/vector-icons'; import { FlatList, Text, View } from 'react-native'; import { Transaction } from '../types'; interface TransactionListProps { transactions: Transaction[]; onDelete?: (id: number) => void; } export default function TransactionList({ transactions, onDelete }: TransactionListProps) { if (transactions.length === 0) { return ( No transactions yet ); } return ( item.id.toString()} contentContainerStyle={{ paddingBottom: 20 }} renderItem={({ item }) => ( {item.category} {item.date} {item.type === 'expense' ? '-' : '+'}€{item.amount.toFixed(2)} {item.description && ( {item.description} )} )} /> ); }