From 12f29768375900b6ec8cddbd79acba5a3fa437f0 Mon Sep 17 00:00:00 2001 From: Vitor Hideyoshi Date: Sat, 11 Apr 2026 01:14:12 -0300 Subject: [PATCH] feat: refactor article components to use searchParams for pagination and improve content loading --- src/app/(pages)/article/[slug]/page.tsx | 8 ++++---- src/app/(pages)/home/page.tsx | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/(pages)/article/[slug]/page.tsx b/src/app/(pages)/article/[slug]/page.tsx index e0735e4..dce4bac 100644 --- a/src/app/(pages)/article/[slug]/page.tsx +++ b/src/app/(pages)/article/[slug]/page.tsx @@ -6,13 +6,13 @@ import { Suspense } from 'react'; import ReactMarkdown from 'react-markdown'; import remarkGfm from 'remark-gfm'; -interface ArticlePageProps { +type ArticlePageProps = { params: Promise<{ slug: string }>; -} +}; -interface ArticleContentProps { +type ArticleContentProps = { params: Promise<{ slug: string }>; -} +}; function readingTime(text: string): number { const words = text.trim().split(/\s+/).length; diff --git a/src/app/(pages)/home/page.tsx b/src/app/(pages)/home/page.tsx index 9111720..4c5a223 100644 --- a/src/app/(pages)/home/page.tsx +++ b/src/app/(pages)/home/page.tsx @@ -36,9 +36,9 @@ const ArticleListSkeleton = () => ( ); -interface ArticleListProps { +type ArticleListProps = { searchParams: Promise<{ page?: string; pageSize?: string }>; -} +}; const ArticleList = async ({ searchParams }: ArticleListProps) => { const { page: pageParam, pageSize: pageSizeParam } = await searchParams;