Skip to content

Commit

Permalink
chore: upgrade phoenix to 1.7: check if flash is empty to avoid empty…
Browse files Browse the repository at this point in the history
… alert boxes
  • Loading branch information
nwittstruck committed Jan 5, 2024
1 parent b55e57a commit d0e7204
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions lib/qrstorage_web/templates/layout/app.html.heex
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,16 @@
</h1>
<div class="row">
<div class="col-sm-12">
<p class="alert alert-info" role="alert">
<%= Phoenix.Flash.get(@flash, :info) %>
</p>
<p class="alert alert-danger" role="alert">
<%= Phoenix.Flash.get(@flash, :error) %>
</p>
<%= if Phoenix.Flash.get(@flash, :info) do %>
<p class="alert alert-info" role="alert">
<%= Phoenix.Flash.get(@flash, :info) %>
</p>
<% end %>
<%= if Phoenix.Flash.get(@flash, :error) do %>
<p class="alert alert-danger" role="alert">
<%= Phoenix.Flash.get(@flash, :error) %>
</p>
<% end %>
</div>
</div>
<%= @inner_content %>
Expand Down

0 comments on commit d0e7204

Please sign in to comment.