only show published posts

This commit is contained in:
Jordi Enric
2024-04-03 01:41:49 +02:00
parent 437718504c
commit a55faeeab0
+2 -1
View File
@@ -11,7 +11,8 @@ async function HostedBlog({
const posts = await supa
.from("public_posts_v1")
.select("title, slug, published_at")
.eq("blog_slug", subdomain);
.eq("blog_slug", subdomain)
.eq("published", true);
const formatDate = (date: string) => {
return new Date(date).toLocaleDateString("en-US", {