Skip to content

Commit

Permalink
fix: revalidate stats page
Browse files Browse the repository at this point in the history
  • Loading branch information
hyochan committed Dec 3, 2023
1 parent 2e55243 commit 2a5296a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/[lang]/stats/[login]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type {ReactElement} from 'react';

import {revalidatePath} from 'next/cache';
import {getDoobooStats} from '../../../../server/services/githubService';
import {getTranslates} from '../../../../src/localization';
import Container from '../Container';
Expand All @@ -16,11 +17,14 @@ export default async function Page({
params: {lang, login},
}: Props): Promise<ReactElement> {
const {stats: tStats} = await getTranslates(lang);

const stats = await getDoobooStats({
login,
lang,
});

revalidatePath('/stats', 'page');

return (
<Container t={tStats}>
{!!stats ? <Scouter stats={stats} t={tStats} /> : null}
Expand Down

2 comments on commit 2a5296a

@vercel
Copy link

@vercel vercel bot commented on 2a5296a Dec 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

github-stats – ./

stats.dooboo.io
github-stats-git-main-hyochan.vercel.app
stats.hyochan.dev
github-stats-hyochan.vercel.app

@lulunac27a
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My stats are now updating every day

Please sign in to comment.