We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d37dee commit 7786528Copy full SHA for 7786528
src/library-authoring/collections/CollectionDetails.tsx
@@ -55,7 +55,9 @@ const CollectionStatsWidget = ({ collection }: CollectionStatsWidgetProps) => {
55
.sort((a, b) => b.count - a.count);
56
57
const totalBlocksCount = blockTypesArray.reduce((acc, { count }) => acc + count, 0);
58
- const otherBlocks = blockTypesArray.splice(3);
+ // Show the top 3 block type counts individually, and splice the remaining block types together under "Other".
59
+ const numBlockTypesShown = 3;
60
+ const otherBlocks = blockTypesArray.splice(numBlockTypesShown);
61
const otherBlocksCount = otherBlocks.reduce((acc, { count }) => acc + count, 0);
62
63
if (totalBlocksCount === 0) {
0 commit comments