Skip to content

Commit

Permalink
fix: fetch with revalidate
Browse files Browse the repository at this point in the history
  • Loading branch information
hyochan committed Nov 24, 2023
1 parent 612285f commit 9a0439c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/[lang]/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
export const revalidate = 3600

import 'server-only';
import '../../styles/output.css';

Expand Down
1 change: 1 addition & 0 deletions src/fetches/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export const fetchGithubStats = async (login: string): Promise<string> => {
Accept: 'application/json',
'Content-Type': 'image/svg+xml',
},
next: {revalidate: 3600},
};

try {
Expand Down

1 comment on commit 9a0439c

@vercel
Copy link

@vercel vercel bot commented on 9a0439c Nov 24, 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 – ./

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

Please sign in to comment.