Skip to content

Commit 2a5296a

Browse files
committed
fix: revalidate stats page
1 parent 2e55243 commit 2a5296a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/[lang]/stats/[login]/page.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type {ReactElement} from 'react';
22

3+
import {revalidatePath} from 'next/cache';
34
import {getDoobooStats} from '../../../../server/services/githubService';
45
import {getTranslates} from '../../../../src/localization';
56
import Container from '../Container';
@@ -16,11 +17,14 @@ export default async function Page({
1617
params: {lang, login},
1718
}: Props): Promise<ReactElement> {
1819
const {stats: tStats} = await getTranslates(lang);
20+
1921
const stats = await getDoobooStats({
2022
login,
2123
lang,
2224
});
2325

26+
revalidatePath('/stats', 'page');
27+
2428
return (
2529
<Container t={tStats}>
2630
{!!stats ? <Scouter stats={stats} t={tStats} /> : null}

0 commit comments

Comments
 (0)