()
| 59 | </header> |
| 60 | ); |
| 61 | } |
| 62 | |
| 63 | export async function StarsCount() { |
| 64 | "use cache"; |
| 65 | |
| 66 | const data = await fetch( |
| 67 | "https://api.github.com/repos/theorcdev/github-creature" |
| 68 | ); |
| 69 | const json = await data.json(); |
| 70 | const stars = json.stargazers_count; |
| 71 | |
| 72 | return ( |
| 73 | <span className="hidden w-12 text-muted-foreground text-xs tabular-nums sm:inline"> |
| 74 | {stars >= 1000 ? `${(stars / 1000).toFixed(1)}k` : stars.toLocaleString()} |
| 75 | </span> |
| 76 | ); |
| 77 | } |
nothing calls this directly
no outgoing calls
no test coverage detected