fix(public): remove db dependencies and use traditional api call to get stats

This commit is contained in:
Carl-Gerhard Lindesvärd
2025-02-27 00:07:25 +01:00
parent 9d43cc49c4
commit d6f5bb7833
9 changed files with 55 additions and 53 deletions

View File

@@ -14,9 +14,13 @@ function formatStars(stars: number) {
}
export function GithubButton() {
const [stars, setStars] = useState(3_263);
const [stars, setStars] = useState(3_700);
useEffect(() => {
getGithubRepoInfo().then((res) => setStars(res.stargazers_count));
getGithubRepoInfo().then((res) => {
if (res?.stargazers_count) {
setStars(res.stargazers_count);
}
});
}, []);
return (
<Button variant={'secondary'} asChild>