Skip to content

Commit

Permalink
Remove shortcut link if there are no comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mlandauer committed Feb 20, 2024
1 parent b05c7b2 commit 9a10a88
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/views/_tailwind/applications/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,10 @@
Comments made here
<%= @comments.empty? ? "will be" : "were" %>
sent to <strong><%= @application.comment_recipient_full_name %></strong>.
<%= 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 %>
</p>
<% @comments.each do |comment| %>
<div class="pt-12" id="comment<%= comment.id %>">
Expand Down

0 comments on commit 9a10a88

Please sign in to comment.