| 13 | }; |
| 14 | |
| 15 | const formatNumber = num => { |
| 16 | if (num < 1000) return num.toString(); |
| 17 | |
| 18 | const rounded = Math.ceil(num / 100) * 100; |
| 19 | return new Intl.NumberFormat('en', { notation: 'compact', maximumFractionDigits: 1 }).format(rounded); |
| 20 | }; |
| 21 | |
| 22 | export const getStarsCount = async () => { |
| 23 | try { |