diff --git a/src/hooks/useGitHubStars.ts b/src/hooks/useGitHubStars.ts index 2e73181..fd399dd 100644 --- a/src/hooks/useGitHubStars.ts +++ b/src/hooks/useGitHubStars.ts @@ -38,10 +38,11 @@ export const useGitHubStars = (owner: string, repo: string) => { const fetchStars = async () => { try { - const response = await fetch(`https://api.github.com/repos/${owner}/${repo}`); + const baseUrl = import.meta.env.VITE_FORGEJO_BASE_URL || 'https://forge.wilddragon.net'; + const response = await fetch(`${baseUrl}/api/v1/repos/${owner}/${repo}`); if (!response.ok) return; const data = await response.json(); - const count = data.stargazers_count; + const count = data.stars_count; if (typeof count === 'number') { setStarCount(count); try {