diff --git a/.env.example b/.env.example
index f6d545b..8bc1dfe 100644
--- a/.env.example
+++ b/.env.example
@@ -7,6 +7,8 @@ NEXTAUTH_SECRET=
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
+GITHUB_ACCESS_TOKEN=
+
# -----------------------------------------------------------------------------
# Database (MySQL - PlanetScale)
# -----------------------------------------------------------------------------
diff --git a/app/(marketing)/page.tsx b/app/(marketing)/page.tsx
index 8597400..bdf0706 100644
--- a/app/(marketing)/page.tsx
+++ b/app/(marketing)/page.tsx
@@ -1,10 +1,13 @@
import Link from "next/link"
-import { toWords } from "number-to-words"
import { Icons } from "@/components/icons"
async function getGitHubStars(): Promise {
const response = await fetch("https://api.github.com/repos/shadcn/taxonomy", {
+ headers: {
+ Accept: "application/vnd.github+json",
+ Authorization: `Bearer ${process.env.GITHUB_ACCESS_TOKEN}`,
+ },
next: {
revalidate: 60,
},
@@ -16,7 +19,7 @@ async function getGitHubStars(): Promise {
const json = await response.json()
- return toWords(json["stargazers_count"])
+ return parseInt(json["stargazers_count"]).toLocaleString()
}
export default async function IndexPage() {
@@ -193,9 +196,29 @@ export default async function IndexPage() {
-
- {stars} stars on GitHub
-
+
+
+
+
+
+ {stars} stars on GitHub
+
+
+
diff --git a/package.json b/package.json
index 5294d44..3d37e2a 100644
--- a/package.json
+++ b/package.json
@@ -42,7 +42,6 @@
"next-mdx-remote": "^4.1.0",
"node-cache": "^5.1.2",
"nodemailer": "^6.8.0",
- "number-to-words": "^1.2.4",
"postmark": "^3.0.14",
"prop-types": "^15.8.1",
"react": "^18.2.0",
diff --git a/yarn.lock b/yarn.lock
index 06c10d4..3e33872 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2821,11 +2821,6 @@ normalize-range@^0.1.2:
resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942"
integrity sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==
-number-to-words@^1.2.4:
- version "1.2.4"
- resolved "https://registry.yarnpkg.com/number-to-words/-/number-to-words-1.2.4.tgz#e0f124de9628f8d86c4eeb89bac6c07699264501"
- integrity sha512-/fYevVkXRcyBiZDg6yzZbm0RuaD6i0qRfn8yr+6D0KgBMOndFPxuW10qCHpzs50nN8qKuv78k8MuotZhcVX6Pw==
-
oauth@^0.9.15:
version "0.9.15"
resolved "https://registry.yarnpkg.com/oauth/-/oauth-0.9.15.tgz#bd1fefaf686c96b75475aed5196412ff60cfb9c1"