Listing Invites

<%= if @live_action in [:new, :edit] do %> <%= live_modal CanneryWeb.InviteLive.FormComponent, id: @invite.id || :new, title: @page_title, action: @live_action, invite: @invite, return_to: Routes.invite_index_path(@socket, :index) %> <% end %> <%= for invite <- @invites do %> <% end %>
Name Token Uses left
<%= invite.name %> <%= invite.token %> <%= invite.uses_left || "Unlimited" %> <%= live_redirect "Show", to: Routes.invite_show_path(@socket, :show, invite) %> <%= live_patch "Edit", to: Routes.invite_index_path(@socket, :edit, invite) %> <%= link "Delete", to: "#", phx_click: "delete", phx_value_id: invite.id, data: [confirm: "Are you sure?"] %>
<%= live_patch "New Invite", to: Routes.invite_index_path(@socket, :new) %>