Skip to content

Commit

Permalink
Remove unused revalidation
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunkomath committed Jan 12, 2025
1 parent 3c383b3 commit 7da19a7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 32 deletions.
3 changes: 0 additions & 3 deletions app/(legal)/terms/page.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import { Header } from "@/components/layout/header";

export const revalidate = 0;
export const dynamic = "force-dynamic";

export default function TermsAndConditions() {
return (
<div className="h-full dark:text-gray-100">
Expand Down
30 changes: 1 addition & 29 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,7 @@ import { Header } from "@/components/layout/header";
import { SITE_METADATA } from "@/data/marketing";
import Link from "next/link";

export const revalidate = 0;
export const dynamic = "force-dynamic";

async function getGitHubStars(): Promise<string | null> {
try {
const response = await fetch(
"https://api.github.com/repos/techulus/manage",
{
headers: {
Accept: "application/vnd.github+json",
},
},
);

if (!response?.ok) {
return null;
}

const json = await response.json();

return Number.parseInt(json.stargazers_count).toLocaleString();
} catch (error) {
return null;
}
}

export default async function Home() {
const stars = (await getGitHubStars()) ?? "-";

return (
<div className="h-full">
<Header />
Expand Down Expand Up @@ -85,7 +57,7 @@ export default async function Home() {
<div className="flex items-center">
<div className="h-4 w-4 border-y-8 border-l-0 border-r-8 border-solid border-muted border-y-transparent" />
<div className="flex h-10 items-center rounded-md border border-muted bg-muted px-4 font-medium">
{stars} stars on GitHub
Star on GitHub
</div>
</div>
</Link>
Expand Down

0 comments on commit 7da19a7

Please sign in to comment.