feat: homepage add github stars

This commit is contained in:
JOYCEQL
2024-12-25 14:44:43 +08:00
committed by qingchen
parent 84d8792568
commit 91faef5844
@@ -28,7 +28,6 @@ export default function GitHubStars() {
);
const data: GitHubRepo = await response.json();
const count = data.stargazers_count;
// 格式化数字,例如 1234 -> 1.2k
setStars(
count >= 1000 ? `${(count / 1000).toFixed(1)}k` : count.toString()
);