<%= @post.title %>

<%= if Ecto.assoc_loaded?(@post.upload) && !is_nil(@post.upload) do %> <% end %>
<%= @post.body %>
<%= if Aggiedit.Roles.guard?(@current_user, :edit, @post) do %> <%= live_patch "Edit", to: Routes.post_show_path(@socket, :edit, @room, @post), class: "button" %> | <% end %> <%= live_redirect "Back", to: Routes.post_index_path(@socket, :index, @room) %>
Chat
<%= if @live_action in [:edit] do %> <.modal return_to={Routes.post_show_path(@socket, :show, @room, @post)}> <.live_component module={AggieditWeb.PostLive.FormComponent} id={@post.id} current_user={@current_user} title={@page_title} action={@live_action} post={@post} return_to={Routes.post_show_path(@socket, :show, @room, @post)} /> <% end %>