Skip to content

Commit

Permalink
{ cache: 'no-store' }
Browse files Browse the repository at this point in the history
  • Loading branch information
SH20RAJ authored Mar 20, 2024
1 parent e14fcb4 commit ee6400f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/[slug]/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default function ArticlesPage({ params }) {
setIsLoading(true);
try {
const response = await fetch(
`https://dev.to/api/articles?username=${params.slug}&per_page=100&page=${page}&random=${Math.random()}`
`https://dev.to/api/articles?username=${params.slug}&per_page=100&page=${page}`,{ cache: 'no-store' }
);
const data = await response.json();
setArticles((prevArticles) => [...prevArticles, ...data]);
Expand Down
2 changes: 1 addition & 1 deletion src/app/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function ArticlesPage() {
setIsLoading(true);
try {
const response = await fetch(
`https://dev.to/api/articles/latest/?per_page=12&page=${page}`
`https://dev.to/api/articles/latest/?per_page=22&page=${page}`
);
const data = await response.json();
setArticles((prevArticles) => [...prevArticles, ...data]);
Expand Down

0 comments on commit ee6400f

Please sign in to comment.