Browse Source

fix: crash at empty blog list

main
Inhji Y. 7 months ago
parent
commit
82bf18e2d4
  1. 4
      lib/mirage_web/live/blog_live.html.leex

4
lib/mirage_web/live/blog_live.html.leex

@ -11,9 +11,9 @@
return_to: Routes.list_show_path(@socket, :show, @list) %>
<% end %>
<%= if is_nil(@list) or Enum.count(@list) == 0 do %>
<%= if is_nil(@list) or Enum.count(@list.notes) == 0 do %>
<section class="width-full bg-content">
Looks like you did not create a blog list yet. Just name it <code>@blog</code> and it will show up here.
Looks like you did not create a blog list yet. Just name it <code>@blog</code> and its notes will show up here.
</section>
<% else %>
<section class="bg-content width-full">

Loading…
Cancel
Save