Only show boosts carousel if there are >10 items

This commit is contained in:
Lim Chee Aun 2023-04-05 18:52:15 +08:00
parent 18b00b2b7a
commit 4b42118742

View file

@ -18,7 +18,10 @@ export function groupBoosts(values) {
} }
// if boostStash is more than quarter of values // if boostStash is more than quarter of values
// or if there are 3 or more boosts in a row // 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 // if boostStash is more than 3 quarter of values
const boostStashID = boostStash.map((status) => status.id); const boostStashID = boostStash.map((status) => status.id);
if (boostStash.length > (values.length * 3) / 4) { if (boostStash.length > (values.length * 3) / 4) {