new-personal-site/components/pages/blog/(sections)/BlogPostsList.tsx
Benjamin Toby a0a0ab8ee4 Updates
2025-07-20 10:35:54 +01:00

26 lines
826 B
TypeScript

import EmptyContent from "@/components/lib/elements/EmptyContent";
import Section from "@/components/lib/layout/Section";
import { AppContext } from "@/pages/_app";
import React from "react";
import BlogPostsListCard from "./BlogPostsListCard";
import Stack from "@/components/lib/layout/Stack";
export default function BlogPostsList() {
const { pageProps } = React.useContext(AppContext);
const { blogPosts } = pageProps;
if (!blogPosts?.[0]) {
return <EmptyContent title={`No Blog Posts at this moment`} />;
}
return (
<Section className="!mt-0 !pt-0">
<Stack className="w-full">
{blogPosts.map((post, index) => {
return <BlogPostsListCard post={post} key={index} />;
})}
</Stack>
</Section>
);
}