diff --git a/apps/public/components/github-button.tsx b/apps/public/components/github-button.tsx index a5461d33..82fff4c8 100644 --- a/apps/public/components/github-button.tsx +++ b/apps/public/components/github-button.tsx @@ -1,7 +1,8 @@ 'use client'; +import { getGithubRepoInfo } from '@/lib/github'; import Link from 'next/link'; -import { useState } from 'react'; +import { useEffect, useState } from 'react'; import { Button } from './ui/button'; function formatStars(stars: number) { @@ -13,10 +14,10 @@ function formatStars(stars: number) { } export function GithubButton() { - const [stars, setStars] = useState(3_100); - // useEffect(() => { - // getGithubRepoInfo().then((res) => setStars(res.stargazers_count)); - // }, []); + const [stars, setStars] = useState(3_263); + useEffect(() => { + getGithubRepoInfo().then((res) => setStars(res.stargazers_count)); + }, []); return (