From 6789da353028b7061b6f8ad1952c5f0ffe64db3e Mon Sep 17 00:00:00 2001 From: Sh Raj Date: Thu, 21 Mar 2024 05:38:54 +0000 Subject: [PATCH] slug --- src/app/[slug]/page.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/[slug]/page.js b/src/app/[slug]/page.js index 8fad472..2602160 100644 --- a/src/app/[slug]/page.js +++ b/src/app/[slug]/page.js @@ -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]);