From 4b4211874236f8ac5f58aab5da5318fcabf9887b Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Wed, 5 Apr 2023 18:52:15 +0800 Subject: [PATCH] Only show boosts carousel if there are >10 items --- src/utils/timeline-utils.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils/timeline-utils.jsx b/src/utils/timeline-utils.jsx index aa6600bb..40994a95 100644 --- a/src/utils/timeline-utils.jsx +++ b/src/utils/timeline-utils.jsx @@ -18,7 +18,10 @@ export function groupBoosts(values) { } // if boostStash is more than quarter of values // or if there are 3 or more boosts in a row - if (boostStash.length > values.length / 4 || serialBoosts >= 3) { + if ( + values.length > 10 && + (boostStash.length > values.length / 4 || serialBoosts >= 3) + ) { // if boostStash is more than 3 quarter of values const boostStashID = boostStash.map((status) => status.id); if (boostStash.length > (values.length * 3) / 4) {