From e4da2ef485505b07c3950ff44f1e58a99e8f741b Mon Sep 17 00:00:00 2001 From: WildDragon Deploy Date: Wed, 27 May 2026 23:36:19 -0400 Subject: [PATCH] feat: use Forgejo stars API instead of GitHub --- src/hooks/useGitHubStars.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 {