Listing Threads

<%= if @live_action in [:new, :edit] do %> <.modal return_to={Routes.thread_index_path(@socket, :index)}> <.live_component module={SomethingErlangWeb.ThreadLive.FormComponent} id={@thread.id || :new} title={@page_title} action={@live_action} thread={@thread} return_to={Routes.thread_index_path(@socket, :index)} /> <% end %> <%= for thread <- @threads do %> <% end %>
Title Thread
<%= thread.title %> <%= thread.thread_id %> <%= live_redirect "Show", to: Routes.thread_show_path(@socket, :show, thread) %> <%= live_patch "Edit", to: Routes.thread_index_path(@socket, :edit, thread) %> <%= link "Delete", to: "#", phx_click: "delete", phx_value_id: thread.id, data: [confirm: "Are you sure?"] %>
<%= live_patch "New Thread", to: Routes.thread_index_path(@socket, :new) %>