Skip to content

Commit

Permalink
Show notice wrapper if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
ahangarha committed Oct 10, 2023
1 parent a315ca2 commit bfa0fd1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/views/comments/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="prose max-w-full prose-a:text-sky-700 prose-li:my-0 prose-code:text-rose-600 prose-code:bg-yellow-100 prose-headings:text-gray-700">
<% if notice %>
<p id="notice" class="bg-success bg-green-100 px-6 py-4"><%= notice %></p>
<% end%>
<% end %>

<h2>Listing Comments</h2>

Expand Down
4 changes: 3 additions & 1 deletion app/views/comments/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<div class="comment my-4">
<p id="notice" class="bg-success bg-green-100 px-6 py-4"><%= notice %></p>
<% if notice %>
<p id="notice" class="bg-success bg-green-100 px-6 py-4"><%= notice %></p>
<% end %>

<p class="js-comment-author">
<strong>Author:</strong>
Expand Down

0 comments on commit bfa0fd1

Please sign in to comment.