Skip to content
This repository has been archived by the owner on Aug 3, 2024. It is now read-only.

Commit

Permalink
add separator to blog posts
Browse files Browse the repository at this point in the history
  • Loading branch information
sametcn99 committed Mar 4, 2024
1 parent 3bbd6f5 commit 17e0f67
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions components/home/Blogs.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
import { getSortedPostsData } from "@/lib/utils/blog/getPosts";
import PostCard from "./post-card";
import { Heading } from "@radix-ui/themes";
import { Heading, Separator } from "@radix-ui/themes";
import React from "react";

// Define and export the 'RenderPosts' component
export default function RenderPosts() {
const posts = getSortedPostsData(); // Call the getSortedPostsData function to retrieve the sorted posts data.

// Render each post as a 'PostCard' component separated by a 'Divider'
return (
<section className="flex flex-col gap-4">
<section className="flex w-full flex-col gap-4">
<Heading as="h2" size="4" className="mb-4">
Read more about GPV
</Heading>
{posts.map((post: BlogPost, index: number) => (
<div key={`${index}-post`}>
<React.Fragment key={index}>
<PostCard post={post} key={`${index}-post-card`} />
</div>
<Separator className="w-full" size="4" key={`${index}-separator`} />
</React.Fragment>
))}
</section>
);
Expand Down

1 comment on commit 17e0f67

@vercel
Copy link

@vercel vercel bot commented on 17e0f67 Mar 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.