Skip to content

Commit

Permalink
chore: more realistic default value if github fetch fails
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusmarminge committed Feb 28, 2024
1 parent 640a0e0 commit 276dde4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions www/src/components/navigation/githubIcon.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
import { getIsRtlFromUrl, getLanguageFromURL } from "../../languages";
import { fetchGithub } from "../../utils/fetchGithub";
let githubStars = 42069;
let githubStars = 23000;
try {
(await fetchGithub("https://api.github.com/repos/t3-oss/create-t3-app", {
throwIfNoAuth: false,
fetchType: "repo",
}).then((data) => data?.stargazers_count)) ?? 42069;
}).then((data) => data?.stargazers_count)) ?? 23000;
} catch (e) {
console.error("unable to fetch from github", e);
}
Expand Down

0 comments on commit 276dde4

Please sign in to comment.