Skip to content

Commit

Permalink
Add conditional rendering for no posts in GardenHome component
Browse files Browse the repository at this point in the history
  • Loading branch information
jordienr committed Jun 7, 2024
1 parent 75a936b commit 6dbb3d9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions apps/web/app/pub/themes/garden/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ export function GardenHome({ blog, posts, disableLinks }: BlogHomeProps) {
<div className="p-3">
<h2 className={`${serif.className} px-4 text-2xl italic`}>Blog </h2>

{posts.length === 0 && (
<div className="py-8">
<h2 className={`text-2xl font-medium ${serif.className}`}>
No posts yet
</h2>
<p className="text-gray-500">Check back later, see you soon!</p>
</div>
)}
<div className="divide mt-4 grid gap-0 md:grid-cols-2">
{posts.map((post) => (
<Link
Expand Down

0 comments on commit 6dbb3d9

Please sign in to comment.