@dust-tt/sparkle 0.2.172 → 0.2.173
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/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/stories/PaginatedCitationsGrid.stories.d.ts +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/stories/PaginatedCitationsGrid.stories.d.ts +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -77901,7 +77901,7 @@ function PaginatedCitationsGrid(_a) {
|
|
|
77901
77901
|
var items = _a.items, _b = _a.maxItemsPerPage, maxItemsPerPage = _b === void 0 ? 9 : _b;
|
|
77902
77902
|
var _c = __read(React.useState(1), 2), currentPage = _c[0], setCurrentPage = _c[1];
|
|
77903
77903
|
var cols = 3;
|
|
77904
|
-
var rows = Math.ceil(maxItemsPerPage / cols);
|
|
77904
|
+
var rows = Math.ceil(Math.min(maxItemsPerPage, items.length) / cols);
|
|
77905
77905
|
if (items.length === 0) {
|
|
77906
77906
|
return null;
|
|
77907
77907
|
}
|