@rpg-engine/long-bow 0.8.165 → 0.8.166
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/long-bow.cjs.development.js +5 -7
- package/dist/long-bow.cjs.development.js.map +1 -1
- package/dist/long-bow.cjs.production.min.js +1 -1
- package/dist/long-bow.cjs.production.min.js.map +1 -1
- package/dist/long-bow.esm.js +5 -7
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Marketplace/BuyPanel.tsx +4 -8
- package/src/stories/Features/trading/Marketplace.stories.tsx +34 -26
package/dist/long-bow.esm.js
CHANGED
|
@@ -46137,6 +46137,8 @@ var BuyPanel = function BuyPanel(_ref) {
|
|
|
46137
46137
|
dcToGoldSwapRate = _ref$dcToGoldSwapRate === void 0 ? 0 : _ref$dcToGoldSwapRate,
|
|
46138
46138
|
_ref$openBuyOrders = _ref.openBuyOrders,
|
|
46139
46139
|
openBuyOrders = _ref$openBuyOrders === void 0 ? [] : _ref$openBuyOrders,
|
|
46140
|
+
_ref$openBuyOrdersTot = _ref.openBuyOrdersTotal,
|
|
46141
|
+
openBuyOrdersTotal = _ref$openBuyOrdersTot === void 0 ? 0 : _ref$openBuyOrdersTot,
|
|
46140
46142
|
_ref$openBuyOrdersPag = _ref.openBuyOrdersPage,
|
|
46141
46143
|
openBuyOrdersPage = _ref$openBuyOrdersPag === void 0 ? 1 : _ref$openBuyOrdersPag,
|
|
46142
46144
|
onOpenBuyOrdersPageChange = _ref.onOpenBuyOrdersPageChange,
|
|
@@ -46247,10 +46249,6 @@ var BuyPanel = function BuyPanel(_ref) {
|
|
|
46247
46249
|
return totalGold(b) - totalGold(a);
|
|
46248
46250
|
});
|
|
46249
46251
|
}, [visibleBuyOrders]);
|
|
46250
|
-
var paginatedGroupedBuyOrders = useMemo(function () {
|
|
46251
|
-
var start = (openBuyOrdersPage - 1) * BUY_REQUESTS_PER_PAGE;
|
|
46252
|
-
return groupedBuyOrders.slice(start, start + BUY_REQUESTS_PER_PAGE);
|
|
46253
|
-
}, [groupedBuyOrders, openBuyOrdersPage]);
|
|
46254
46252
|
var showSellSection = browseMode === 'sell';
|
|
46255
46253
|
var showBuySection = browseMode === 'buy';
|
|
46256
46254
|
var hasVisibleContent = showSellSection && groupedItems.length > 0 || showBuySection && groupedBuyOrders.length > 0;
|
|
@@ -46424,7 +46422,7 @@ var BuyPanel = function BuyPanel(_ref) {
|
|
|
46424
46422
|
onBuy: setBuyingItemId,
|
|
46425
46423
|
onDCCoinClick: onDCCoinClick
|
|
46426
46424
|
});
|
|
46427
|
-
})), showBuySection && React.createElement(MarketSection, null, React.createElement(SectionHeader, null, React.createElement(SectionTitle$2, null, "Buy Requests"), React.createElement(SectionMeta, null, groupedBuyOrders.length, " groups")), groupedBuyOrders.length === 0 ? React.createElement(SectionEmpty, null, "No public buy requests found.") :
|
|
46425
|
+
})), showBuySection && React.createElement(MarketSection, null, React.createElement(SectionHeader, null, React.createElement(SectionTitle$2, null, "Buy Requests"), React.createElement(SectionMeta, null, groupedBuyOrders.length, " groups")), groupedBuyOrders.length === 0 ? React.createElement(SectionEmpty, null, "No public buy requests found.") : groupedBuyOrders.map(function (_ref3) {
|
|
46428
46426
|
var bestOrder = _ref3.bestOrder,
|
|
46429
46427
|
otherOrders = _ref3.otherOrders;
|
|
46430
46428
|
return React.createElement(GroupedBuyOrderRow, {
|
|
@@ -46440,8 +46438,8 @@ var BuyPanel = function BuyPanel(_ref) {
|
|
|
46440
46438
|
currentPage: currentPage,
|
|
46441
46439
|
itemsPerPage: itemsPerPage,
|
|
46442
46440
|
onPageChange: onPageChange
|
|
46443
|
-
}), showBuySection &&
|
|
46444
|
-
totalItems:
|
|
46441
|
+
}), showBuySection && openBuyOrdersTotal > BUY_REQUESTS_PER_PAGE && React.createElement(Pager, {
|
|
46442
|
+
totalItems: openBuyOrdersTotal,
|
|
46445
46443
|
currentPage: openBuyOrdersPage,
|
|
46446
46444
|
itemsPerPage: BUY_REQUESTS_PER_PAGE,
|
|
46447
46445
|
onPageChange: onOpenBuyOrdersPageChange != null ? onOpenBuyOrdersPageChange : function () {}
|