(stars?: number, lang?: string)
| 16 | }; |
| 17 | |
| 18 | export const formatStars = (stars?: number, lang?: string) => { |
| 19 | if (!stars) { |
| 20 | return "Unknown"; |
| 21 | } |
| 22 | |
| 23 | return Intl.NumberFormat(lang, { |
| 24 | minimumFractionDigits: 1, |
| 25 | maximumFractionDigits: 1, |
| 26 | notation: "compact", |
| 27 | trailingZeroDisplay: "stripIfInteger", |
| 28 | }).format(stars); |
| 29 | }; |
| 30 | |
| 31 | import { format as timeagojs, register } from "timeago.js"; |
| 32 | import { |