Skip to content

Commit

Permalink
slug
Browse files Browse the repository at this point in the history
  • Loading branch information
SH20RAJ authored Mar 21, 2024
1 parent 785ddbb commit 6789da3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/[slug]/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ export default function ArticlesPage({ params }) {
setIsLoading(true);
try {
const response = await fetch(
`https://dev.to/api/articles?username=${params.slug}&per_page=10&page=${page}`
// `https://dev.to/api/articles?username=${params.slug}&per_page=10&page=${page}`
`https://dev.to/api/articles/latest?username=${params.slug}`
);
const data = await response.json();
setArticles((prevArticles) => [...prevArticles, ...data]);
Expand Down

0 comments on commit 6789da3

Please sign in to comment.