Skip to content

Commit

Permalink
Add publishedAt field and update tag badge style
Browse files Browse the repository at this point in the history
  • Loading branch information
thebkht committed Nov 27, 2023
1 parent 00ed4d5 commit 80ae2cb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions app/(Main)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const [latestPosts, tags, popularPosts] = await Promise.all([
url: true,
createdAt: true,
readingTime: true,
publishedAt: true,
cover: true,
author: {
select: {
Expand Down
6 changes: 3 additions & 3 deletions components/landing/landing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ export default function Landing({ latest, tags, popular }: { latest: any, tags:
</div>
</div>
</div>
<div className="grid-cols-12 lg:grid flex flex-col-reverse pt-14 grid-rows-1 ">
<div style={{ 'gridColumn': '1 / span 7' }} className="mt-10 lg:mt-0">
<div className="grid-cols-12 lg:grid flex flex-col-reverse lg:gap-8 gap-4 pt-14 grid-rows-1">
<div style={{ 'gridColumn': '1 / span 8' }} className="mt-10 lg:mt-0">
{latest.length > 0 ? (
<div className="flex flex-col lg:gap-6 md:gap-5 gap-4">
{latest?.map((post: any) => (
Expand Down Expand Up @@ -113,7 +113,7 @@ export default function Landing({ latest, tags, popular }: { latest: any, tags:
<div className="w-full flex-wrap">
{tags?.map((tag: any) => (
<Link href={`/tags/${tag.name}`} key={tag.id}>
<TagBadge className="my-1.5 mr-1.5 py-2 px-4 text-sm font-medium capitalize" variant={"secondary"}>{tag.name.replace(/-/g, " ")}</TagBadge>
<TagBadge className="my-1 mr-1 text-sm font-medium" variant={"secondary"}>{tag.name.replace(/-/g, " ")}</TagBadge>
</Link>
))}
</div>
Expand Down

0 comments on commit 80ae2cb

Please sign in to comment.