diff --git a/www/src/components/navigation/githubIcon.astro b/www/src/components/navigation/githubIcon.astro index bce84804af..478e6382d2 100644 --- a/www/src/components/navigation/githubIcon.astro +++ b/www/src/components/navigation/githubIcon.astro @@ -2,18 +2,24 @@ import { getIsRtlFromUrl, getLanguageFromURL } from "../../languages"; import { fetchGithub } from "../../utils/fetchGithub"; -let githubStars = 23000; +let githubStars = 25000; try { - (await fetchGithub("https://api.github.com/repos/t3-oss/create-t3-app", { - throwIfNoAuth: false, - fetchType: "repo", - }).then((data) => data?.stargazers_count)) ?? 23000; + const fetchedStars = await fetchGithub( + "https://api.github.com/repos/t3-oss/create-t3-app", + { + throwIfNoAuth: false, + fetchType: "repo", + }, + ).then((data) => data?.stargazers_count); + + githubStars = fetchedStars ?? 25000; } catch (e) { console.error("unable to fetch from github", e); } const ONE_HOUR = 1 * 60 * 60; + Astro.response.headers.set("Cache-Control", `public, max-age=${ONE_HOUR}`); const { pathname } = Astro.url;