From 80ae2cbc927cb8c2c547322f60728270e56496b3 Mon Sep 17 00:00:00 2001 From: Bakhtiyor Ganijon Date: Mon, 27 Nov 2023 14:11:17 +0900 Subject: [PATCH] Add publishedAt field and update tag badge style --- app/(Main)/page.tsx | 1 + components/landing/landing.tsx | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/(Main)/page.tsx b/app/(Main)/page.tsx index 33741e3..50e4452 100644 --- a/app/(Main)/page.tsx +++ b/app/(Main)/page.tsx @@ -34,6 +34,7 @@ const [latestPosts, tags, popularPosts] = await Promise.all([ url: true, createdAt: true, readingTime: true, + publishedAt: true, cover: true, author: { select: { diff --git a/components/landing/landing.tsx b/components/landing/landing.tsx index d7a855d..8f96205 100644 --- a/components/landing/landing.tsx +++ b/components/landing/landing.tsx @@ -82,8 +82,8 @@ export default function Landing({ latest, tags, popular }: { latest: any, tags: -
-
+
+
{latest.length > 0 ? (
{latest?.map((post: any) => ( @@ -113,7 +113,7 @@ export default function Landing({ latest, tags, popular }: { latest: any, tags:
{tags?.map((tag: any) => ( - {tag.name.replace(/-/g, " ")} + {tag.name.replace(/-/g, " ")} ))}