PaymentCard Component: Added a PaymentCard component that dynamically displays whether the current user owes money or is owed money within an expense group.
API Functions: Updated the /functions/functions.tsx to include the getPayments function, enabling fetching payment data for an expense group.
React Query Hook: Created a usePayments hook using react-query to efficiently fetch and cache payment data for an expense group.
Types
Payment Interface: Added the Payment interface to describe the structure of payment details between users.
ExpenseGroupPayments Interface: Added the ExpenseGroupPayments interface, representing a collection of payments within an expense group along with metadata like totalExpenses and numOfParticipants.
Changes
Features
PaymentCard
component that dynamically displays whether the current user owes money or is owed money within an expense group./functions/functions.tsx
to include thegetPayments
function, enabling fetching payment data for an expense group.usePayments
hook usingreact-query
to efficiently fetch and cache payment data for an expense group.Types
Payment
interface to describe the structure of payment details between users.ExpenseGroupPayments
interface, representing a collection of payments within an expense group along with metadata liketotalExpenses
andnumOfParticipants
.