<%= if @live_action in [:edit] do %> <.modal return_to={Routes.thread_show_path(@socket, :show, @thread)}> <.live_component module={SomethingErlangWeb.ThreadLive.FormComponent} id={@thread.id} title={@page_title} action={@live_action} thread={@thread} return_to={Routes.thread_show_path(@socket, :show, @thread)} /> </.modal> <% end %> <h2> <%= raw @thread.title %> </h2> <div class="thread my-8"> <.pagination socket={@socket} thread={@thread} /> <%= for post <- @thread.posts do %> <.post author={post.userinfo} article={post.postbody} date={post.postdate} /> <% end %> <.pagination socket={@socket} thread={@thread} /> </div>