()
| 76 | // Fetch GitHub stars |
| 77 | useEffect(() => { |
| 78 | const fetchGitHubStars = async () => { |
| 79 | try { |
| 80 | const response = await fetch( |
| 81 | 'https://api.github.com/repos/Sma1lboy/codefox' |
| 82 | ); |
| 83 | if (response.ok) { |
| 84 | const data = await response.json(); |
| 85 | setStarCount(data.stargazers_count); |
| 86 | } |
| 87 | } catch (error) { |
| 88 | logger.error('Error fetching GitHub stars:', error); |
| 89 | } finally { |
| 90 | setIsLoading(false); |
| 91 | } |
| 92 | }; |
| 93 | |
| 94 | fetchGitHubStars(); |
| 95 | }, []); |