| 1 | export function LiveStarCount({ initial, numberLocale, asOf }: { initial?: number; numberLocale: string; asOf?: string }) { |
| 2 | if (initial === undefined) return null; |
| 3 | const formatted = new Intl.NumberFormat(numberLocale).format(initial); |
| 4 | return ( |
| 5 | <span |
| 6 | className="github-star-count tabular" |
| 7 | title={asOf} |
| 8 | aria-label={asOf ? `${formatted}, ${asOf}` : undefined} |
| 9 | > |
| 10 | {formatted} |
| 11 | </span> |
| 12 | ); |
| 13 | } |
| 14 |