fix: hide comments button if post has comments disabled

This commit is contained in:
trisua 2025-06-03 18:09:12 -04:00
parent 85c1c72cc4
commit b5e060e8ae

View file

@ -248,12 +248,15 @@
(text "{%- endif %}") (text "{%- endif %}")
(div (div
("class" "flex gap-1 buttons_box") ("class" "flex gap-1 buttons_box")
(text "{% if post.context.comments_enabled %}")
(a (a
("href" "/post/{{ post.id }}") ("href" "/post/{{ post.id }}")
("class" "button camo small") ("class" "button camo small")
(text "{{ icon \"message-circle\" }}") (text "{{ icon \"message-circle\" }}")
(span (span
(text "{{ post.comment_count }}"))) (text "{{ post.comment_count }}")))
(text "{% endif %}")
(a (a
("href" "/post/{{ post.id }}") ("href" "/post/{{ post.id }}")
("class" "button camo small") ("class" "button camo small")