Closed kacpergumieniuk closed 2 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
market-frontend | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Sep 23, 2024 11:58am |
The pull request introduces several enhancements to the market interface by adding new hooks (useUserPositions
and useUserOrders
) for fetching user-specific data, including positions and orders. It also introduces a new component, MarketInterfaceLowerBarDataItem
, for displaying financial data with improved clarity. The TradingHubContentContainer
and related components have been refactored to utilize these hooks, streamlining data management. Additionally, new GraphQL queries and state management atoms have been implemented to support these features.
Files | Change Summary |
---|---|
components/Market/.../MarketInterfaceLowerBar.tsx |
Added hooks useUserPositions and useUserOrders , calculated totalBalance , and updated rendering logic with new data items and tooltips. |
components/Market/.../MarketInterfaceLowerBarDataItem.tsx |
Introduced a new component for displaying market data items with loading states and tooltips. |
components/Market/.../TradingHubContentContainer.tsx |
Refactored to use new hooks for fetching user orders and positions, simplifying data management. |
components/Market/.../TradingHubOrders/TradingHubOrders.tsx |
Updated TradingHubOrdersProps to use separate properties for closeOrders and openOrders . |
components/Market/.../TradingHubPositions/.../TradingHubAggregatedPosition.tsx |
Moved variable declaration for positionsWithSide for better organization. |
components/Market/.../TradingHubPositions/TradingHubPositions.tsx |
Removed internal aggregation function, now accepts aggregatedPositions as a prop. |
hooks/useUserOrders.ts |
Added custom hook for managing user orders, including fetching and categorizing orders. |
hooks/useUserPositions.ts |
Added custom hook for managing user positions, including fetching and aggregating positions. |
package.json |
Updated @nextui-org/react package version from ^2.4.6 to ^2.4.8 . |
requests/queries.ts |
Added new GraphQL query OPEN_ORDER_MARGIN for fetching order margins. |
store/store.ts |
Introduced two new atoms: userPositionsAtom and userOrdersAtom for managing user data. |
useUserPositions
and useUserOrders
) that are utilized in TradingHubContentContainer.tsx
.TradingHubContentContainer.tsx
to include new queries for fetching market settlements, related to user data management.Chart
component to handle oracle data, complementing user data functionalities.Chart
component to include oracle data, directly related to the enhancements in user data handling.🐇 In the market where bunnies play,
New hooks and components brighten the day.
With balances shown and orders clear,
Our trading joy is now so near!
So hop along, let’s celebrate,
For data’s dance is truly great! 🎉
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
90 #93
Summary by CodeRabbit
New Features
Bug Fixes
Refactor
Chores