Skip to content

Commit

Permalink
Reverted stats
Browse files Browse the repository at this point in the history
  • Loading branch information
andrealbiac committed Dec 4, 2024
1 parent 1509d81 commit 814c870
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions packages/nextjs/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -438,16 +438,15 @@ const Home: NextPage<{
};

export const getStaticProps: GetStaticProps<{ stats: Stats }> = async () => {
const res = await fetch(`${process.env.NEXT_PUBLIC_BG_BACKEND_API}/api/stats`);

if (!res.ok) throw new Error(`Failed to fetch stats, received status ${res.status}`);

const stats = (await res.json()) as Stats;

return {
props: {
stats: {
builderCount: "50",
buildCount: "100",
streamedEth: 100,
buildersIncrementMonth: 10,
buildsIncrementMonth: 10,
streamedEthIncrement: 10,
},
stats,
},
// 6 hours refresh.
revalidate: 21600,
Expand Down

0 comments on commit 814c870

Please sign in to comment.