From b5e060e8ae211821e6627163d0db0c49bf473e67 Mon Sep 17 00:00:00 2001
From: trisua <me@trisua.com>
Date: Tue, 3 Jun 2025 18:09:12 -0400
Subject: [PATCH] fix: hide comments button if post has comments disabled

---
 crates/app/src/public/html/components.lisp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/crates/app/src/public/html/components.lisp b/crates/app/src/public/html/components.lisp
index 61b6ed8..a5df713 100644
--- a/crates/app/src/public/html/components.lisp
+++ b/crates/app/src/public/html/components.lisp
@@ -248,12 +248,15 @@
             (text "{%- endif %}")
             (div
                 ("class" "flex gap-1 buttons_box")
+                (text "{% if post.context.comments_enabled %}")
                 (a
                     ("href" "/post/{{ post.id }}")
                     ("class" "button camo small")
                     (text "{{ icon \"message-circle\" }}")
                     (span
                         (text "{{ post.comment_count }}")))
+                (text "{% endif %}")
+
                 (a
                     ("href" "/post/{{ post.id }}")
                     ("class" "button camo small")