From 9a10a88dc2d6af33052e56522cafcc4f80fd2760 Mon Sep 17 00:00:00 2001
From: Matthew Landauer
Date: Tue, 20 Feb 2024 22:00:22 +0000
Subject: [PATCH] Remove shortcut link if there are no comments
---
app/views/_tailwind/applications/show.html.erb | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/app/views/_tailwind/applications/show.html.erb b/app/views/_tailwind/applications/show.html.erb
index 49cdacde9..a15c4a83d 100644
--- a/app/views/_tailwind/applications/show.html.erb
+++ b/app/views/_tailwind/applications/show.html.erb
@@ -124,7 +124,10 @@
Comments made here
<%= @comments.empty? ? "will be" : "were" %>
sent to <%= @application.comment_recipient_full_name %>.
- <%= pa_link_to "Add your own comment", "#add-comment" %>.
+ <%# No need for shortcut link if there are no comments because that section is directly underneath %>
+ <% unless @comments.empty? %>
+ <%= pa_link_to "Add your own comment", "#add-comment" %>.
+ <% end %>
<% @comments.each do |comment| %>