@rpg-engine/long-bow 0.8.163 → 0.8.165
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 +7 -5
- 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 +7 -5
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Marketplace/BuyPanel.tsx +8 -4
package/dist/long-bow.esm.js
CHANGED
|
@@ -46137,8 +46137,6 @@ 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,
|
|
46142
46140
|
_ref$openBuyOrdersPag = _ref.openBuyOrdersPage,
|
|
46143
46141
|
openBuyOrdersPage = _ref$openBuyOrdersPag === void 0 ? 1 : _ref$openBuyOrdersPag,
|
|
46144
46142
|
onOpenBuyOrdersPageChange = _ref.onOpenBuyOrdersPageChange,
|
|
@@ -46249,6 +46247,10 @@ var BuyPanel = function BuyPanel(_ref) {
|
|
|
46249
46247
|
return totalGold(b) - totalGold(a);
|
|
46250
46248
|
});
|
|
46251
46249
|
}, [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]);
|
|
46252
46254
|
var showSellSection = browseMode === 'sell';
|
|
46253
46255
|
var showBuySection = browseMode === 'buy';
|
|
46254
46256
|
var hasVisibleContent = showSellSection && groupedItems.length > 0 || showBuySection && groupedBuyOrders.length > 0;
|
|
@@ -46422,7 +46424,7 @@ var BuyPanel = function BuyPanel(_ref) {
|
|
|
46422
46424
|
onBuy: setBuyingItemId,
|
|
46423
46425
|
onDCCoinClick: onDCCoinClick
|
|
46424
46426
|
});
|
|
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.") :
|
|
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.") : paginatedGroupedBuyOrders.map(function (_ref3) {
|
|
46426
46428
|
var bestOrder = _ref3.bestOrder,
|
|
46427
46429
|
otherOrders = _ref3.otherOrders;
|
|
46428
46430
|
return React.createElement(GroupedBuyOrderRow, {
|
|
@@ -46438,8 +46440,8 @@ var BuyPanel = function BuyPanel(_ref) {
|
|
|
46438
46440
|
currentPage: currentPage,
|
|
46439
46441
|
itemsPerPage: itemsPerPage,
|
|
46440
46442
|
onPageChange: onPageChange
|
|
46441
|
-
}), showBuySection &&
|
|
46442
|
-
totalItems:
|
|
46443
|
+
}), showBuySection && groupedBuyOrders.length > BUY_REQUESTS_PER_PAGE && React.createElement(Pager, {
|
|
46444
|
+
totalItems: groupedBuyOrders.length,
|
|
46443
46445
|
currentPage: openBuyOrdersPage,
|
|
46444
46446
|
itemsPerPage: BUY_REQUESTS_PER_PAGE,
|
|
46445
46447
|
onPageChange: onOpenBuyOrdersPageChange != null ? onOpenBuyOrdersPageChange : function () {}
|