chingu-voyages / v51-tier3-team-31

Add-project-description-here | Voyage-51 | https://chingu.io/ | Twitter: https://twitter.com/ChinguCollabs
0 stars 0 forks source link

Show balances on balances page #146

Closed Homvi closed 4 weeks ago

Homvi commented 4 weeks ago

Pull Request Description

Overview

This PR enhances the expense management feature by introducing balance-related components, fetching logic, and state management. It includes the following key changes:

Commits

  1. feat: add BalanceCard component with balance display logic

    • Introduced the BalanceCard component to display individual user balances within the expense group.
  2. feat: implement Balances component with balance fetching and rendering

    • Created the Balances component to fetch and render the balance information for expense groups.
  3. feat: add getBalances function to fetch balances for expense groups

    • Implemented a getBalances function that retrieves balance data for specified expense groups.
  4. feat: implement useBalances hook for fetching balances using React Query

    • Developed the useBalances custom hook to utilize React Query for efficient data fetching and caching of balances.
  5. refactor: update ExpenseGroup component to include state management for balances

    • Refactored the ExpenseGroup component to manage balance state, ensuring seamless integration of the new balance features.
  6. feat: add Balance and Balances interfaces for expense group management

    • Added Balance and Balances interfaces to balance.ts for better type definitions and clarity in managing expense group data.