From 9af7ea51f67f26311da14f314a06a630cd713b43 Mon Sep 17 00:00:00 2001 From: CREDO23 Date: Sun, 19 Oct 2025 23:27:14 +0200 Subject: [PATCH] hard code the repo name and repo owner --- surfsense_web/hooks/use-github-stars.ts | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/surfsense_web/hooks/use-github-stars.ts b/surfsense_web/hooks/use-github-stars.ts index 69f9e0339..eefa4cefa 100644 --- a/surfsense_web/hooks/use-github-stars.ts +++ b/surfsense_web/hooks/use-github-stars.ts @@ -3,9 +3,6 @@ import { useEffect, useState } from "react"; export const useGithubStars = () => { - const repo = process.env.NEXT_PUBLIC_GITHUB_REPO; - const owner = process.env.NEXT_PUBLIC_GITHUB_OWNER; - const [stars, setStars] = useState(null); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); @@ -14,13 +11,9 @@ export const useGithubStars = () => { const abortController = new AbortController(); const getStars = async () => { try { - if (!repo || !owner) { - throw new Error("Missing GitHub credentials"); - } - setError(null); - const response = await fetch(`https://api.github.com/repos/${owner}/${repo}`, { + const response = await fetch(`https://api.github.com/repos/MODSetter/SurfSense`, { signal: abortController.signal, }); @@ -46,7 +39,7 @@ export const useGithubStars = () => { return () => { abortController.abort(); }; - }, [repo, owner]); + }, []); return { stars,