'use client'; import Link from 'next/link'; import { useState } from 'react'; import { Button } from './ui/button'; function formatStars(stars: number) { if (stars >= 1000) { const k = stars / 1000; return `${k.toFixed(k >= 10 ? 0 : 1)}k`; } return stars.toString(); } export function GithubButton() { const [stars, setStars] = useState(3_100); // useEffect(() => { // getGithubRepoInfo().then((res) => setStars(res.stargazers_count)); // }, []); return ( ); }