(stars: number)
| 4 | import { Button } from './ui/button'; |
| 5 | |
| 6 | function formatStars(stars: number) { |
| 7 | if (stars >= 1000) { |
| 8 | const k = stars / 1000; |
| 9 | return `${k.toFixed(k >= 10 ? 0 : 1)}k`; |
| 10 | } |
| 11 | return stars.toString(); |
| 12 | } |
| 13 | |
| 14 | export function GithubButton() { |
| 15 | const [stars, setStars] = useState(4_800); |
no test coverage detected