You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Dashboard] Sort usage categories by total amount in descending order (#7314)
# Sort usage categories by total amount
This PR sorts the usage categories displayed on the team usage page by their total amount in descending order. Categories with higher total costs will now appear at the top of the list, making it easier for users to identify their most significant expenses at a glance.
The implementation:
- Creates a `sortedCategories` array by sorting the usage preview data
- Sorts based on the sum of `amountUsdCents` for each category's line items
- Uses the sorted array in the render function instead of the original data
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **Enhancements**
- Usage categories are now displayed in descending order based on their subtotal amounts, making it easier to identify the highest usage categories at a glance.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
0 commit comments