From 26cd9f77e09f1fe0887625d93f872036a826de49 Mon Sep 17 00:00:00 2001 From: Steven Tey Date: Wed, 16 Oct 2024 14:10:15 -0700 Subject: [PATCH] Add ISR for leaderboard page --- app/(hacktoberfest)/leaderboard/page.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/(hacktoberfest)/leaderboard/page.tsx b/app/(hacktoberfest)/leaderboard/page.tsx index 4292216..795b483 100644 --- a/app/(hacktoberfest)/leaderboard/page.tsx +++ b/app/(hacktoberfest)/leaderboard/page.tsx @@ -2,6 +2,9 @@ import { getAllUserPointsList } from "@/lib/points/service"; import LeaderBoard from "./components"; +// revalidate once every hour +export const revalidate = 3600 + export default async function Page() { const allUserPoints = await getAllUserPointsList(); const filteredUserPoints = allUserPoints.filter((user) => user.totalPoints > 0);