jolbol1 / nextjs-velite-blog-template

A static blog template built using NextJS 14, Velite, Tailwind, Shadcn/UI and MDX. Follow along on YouTube!
https://my-first-blog-dusky.vercel.app
120 stars 40 forks source link

Hide post and Tag when published is set to false #8

Closed Paranoia8972 closed 3 months ago

Paranoia8972 commented 3 months ago

Description:

Since the implementation of the ability to publish and unpublish posts, it is now essential to ensure that only published posts are displayed to users. This pull request addresses this requirement by adding a condition to the mapping function that renders the list of posts. This condition checks if each post is published before rendering it. If a post is unpublished, it will be excluded from the list.

Changes Made:

Edit: I forgot to apply the logic for the topics page.

vercel[bot] commented 3 months ago

@Paranoia8972 is attempting to deploy a commit to the jolbol1's projects Team on Vercel.

A member of the Team first needs to authorize it.