@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
|
@@ -46140,8 +46140,6 @@ var BuyPanel = function BuyPanel(_ref) {
|
|
|
46140
46140
|
dcToGoldSwapRate = _ref$dcToGoldSwapRate === void 0 ? 0 : _ref$dcToGoldSwapRate,
|
|
46141
46141
|
_ref$openBuyOrders = _ref.openBuyOrders,
|
|
46142
46142
|
openBuyOrders = _ref$openBuyOrders === void 0 ? [] : _ref$openBuyOrders,
|
|
46143
|
-
_ref$openBuyOrdersTot = _ref.openBuyOrdersTotal,
|
|
46144
|
-
openBuyOrdersTotal = _ref$openBuyOrdersTot === void 0 ? 0 : _ref$openBuyOrdersTot,
|
|
46145
46143
|
_ref$openBuyOrdersPag = _ref.openBuyOrdersPage,
|
|
46146
46144
|
openBuyOrdersPage = _ref$openBuyOrdersPag === void 0 ? 1 : _ref$openBuyOrdersPag,
|
|
46147
46145
|
onOpenBuyOrdersPageChange = _ref.onOpenBuyOrdersPageChange,
|
|
@@ -46252,6 +46250,10 @@ var BuyPanel = function BuyPanel(_ref) {
|
|
|
46252
46250
|
return totalGold(b) - totalGold(a);
|
|
46253
46251
|
});
|
|
46254
46252
|
}, [visibleBuyOrders]);
|
|
46253
|
+
var paginatedGroupedBuyOrders = React.useMemo(function () {
|
|
46254
|
+
var start = (openBuyOrdersPage - 1) * BUY_REQUESTS_PER_PAGE;
|
|
46255
|
+
return groupedBuyOrders.slice(start, start + BUY_REQUESTS_PER_PAGE);
|
|
46256
|
+
}, [groupedBuyOrders, openBuyOrdersPage]);
|
|
46255
46257
|
var showSellSection = browseMode === 'sell';
|
|
46256
46258
|
var showBuySection = browseMode === 'buy';
|
|
46257
46259
|
var hasVisibleContent = showSellSection && groupedItems.length > 0 || showBuySection && groupedBuyOrders.length > 0;
|
|
@@ -46425,7 +46427,7 @@ var BuyPanel = function BuyPanel(_ref) {
|
|
|
46425
46427
|
onBuy: setBuyingItemId,
|
|
46426
46428
|
onDCCoinClick: onDCCoinClick
|
|
46427
46429
|
});
|
|
46428
|
-
})), showBuySection && React__default.createElement(MarketSection, null, React__default.createElement(SectionHeader, null, React__default.createElement(SectionTitle$2, null, "Buy Requests"), React__default.createElement(SectionMeta, null, groupedBuyOrders.length, " groups")), groupedBuyOrders.length === 0 ? React__default.createElement(SectionEmpty, null, "No public buy requests found.") :
|
|
46430
|
+
})), showBuySection && React__default.createElement(MarketSection, null, React__default.createElement(SectionHeader, null, React__default.createElement(SectionTitle$2, null, "Buy Requests"), React__default.createElement(SectionMeta, null, groupedBuyOrders.length, " groups")), groupedBuyOrders.length === 0 ? React__default.createElement(SectionEmpty, null, "No public buy requests found.") : paginatedGroupedBuyOrders.map(function (_ref3) {
|
|
46429
46431
|
var bestOrder = _ref3.bestOrder,
|
|
46430
46432
|
otherOrders = _ref3.otherOrders;
|
|
46431
46433
|
return React__default.createElement(GroupedBuyOrderRow, {
|
|
@@ -46441,8 +46443,8 @@ var BuyPanel = function BuyPanel(_ref) {
|
|
|
46441
46443
|
currentPage: currentPage,
|
|
46442
46444
|
itemsPerPage: itemsPerPage,
|
|
46443
46445
|
onPageChange: onPageChange
|
|
46444
|
-
}), showBuySection &&
|
|
46445
|
-
totalItems:
|
|
46446
|
+
}), showBuySection && groupedBuyOrders.length > BUY_REQUESTS_PER_PAGE && React__default.createElement(Pager, {
|
|
46447
|
+
totalItems: groupedBuyOrders.length,
|
|
46446
46448
|
currentPage: openBuyOrdersPage,
|
|
46447
46449
|
itemsPerPage: BUY_REQUESTS_PER_PAGE,
|
|
46448
46450
|
onPageChange: onOpenBuyOrdersPageChange != null ? onOpenBuyOrdersPageChange : function () {}
|