add blank ammo types page

This commit is contained in:
shibao 2022-02-01 00:12:09 -05:00
parent 1b33632c29
commit cccc5aafc7

View File

@ -3,6 +3,15 @@
Listing Ammo Types
</h1>
<%= if @ammo_types |> Enum.empty?() do %>
<h2 class="title text-xl text-primary-500">
No Ammo Types 😔
</h2>
<%= live_patch "Add your first type!",
to: Routes.ammo_type_index_path(@socket, :new),
class: "btn btn-primary" %>
<% else %>
<%= live_patch "New Ammo type",
to: Routes.ammo_type_index_path(@socket, :new),
class: "btn btn-primary" %>
@ -39,6 +48,7 @@
</tbody>
</table>
</div>
<% end %>
</div>
<%= if @live_action in [:new, :edit] do %>