fix: hardcoded check for draft in development

This commit is contained in:
Alejandro Reyes 2023-08-26 17:04:18 -07:00 committed by GitHub
parent 4b4147c077
commit d2ae32835e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,9 +35,7 @@ export default function TagPage({ params }: { params: { tag: string } }) {
// Capitalize first letter and convert space to dash
const title = tag[0].toUpperCase() + tag.split(' ').join('-').slice(1)
const filteredPosts = allCoreContent(
allBlogs.filter(
(post) => post.draft !== true && post.tags && post.tags.map((t) => slug(t)).includes(tag)
)
allBlogs.filter((post) => post.tags && post.tags.map((t) => slug(t)).includes(tag))
)
return <ListLayout posts={filteredPosts} title={title} />
}