feat: add article page and not found component with markdown rendering
This commit is contained in:
@@ -13,7 +13,11 @@ const Home = async ({ searchParams }: HomeProps) => {
|
||||
const { page: pageParam } = await searchParams;
|
||||
const page = Math.max(1, Number(pageParam) || 1);
|
||||
|
||||
const { data: articles, totalPages, total } = await getArticlesPaginated(page, PAGE_SIZE);
|
||||
const {
|
||||
data: articles,
|
||||
totalPages,
|
||||
total,
|
||||
} = await getArticlesPaginated(page, PAGE_SIZE);
|
||||
|
||||
return (
|
||||
<div className='container mx-auto w-full flex-1 px-4 py-12 md:py-16'>
|
||||
@@ -41,7 +45,10 @@ const Home = async ({ searchParams }: HomeProps) => {
|
||||
) : (
|
||||
<div className='grid gap-6 sm:grid-cols-2 xl:grid-cols-3'>
|
||||
{articles.map((article) => (
|
||||
<ArticleCard key={article.externalId} article={article} />
|
||||
<ArticleCard
|
||||
key={article.externalId}
|
||||
article={article}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user