Show Note
<%= if @live_action in [:edit] do %>
<.modal return_to={Routes.note_show_path(@socket, :show, @note)}>
<.live_component
module={MemexWeb.NoteLive.FormComponent}
id={@note.id}
title={@page_title}
action={@live_action}
note={@note}
return_to={Routes.note_show_path(@socket, :show, @note)}
/>
<% end %>
-
Title:
<%= @note.title %>
-
Content:
<%= @note.content %>
-
Tag:
<%= @note.tag %>
-
Visibility:
<%= @note.visibility %>
<%= live_patch("Edit", to: Routes.note_show_path(@socket, :edit, @note), class: "button") %>
| <%= live_redirect("Back", to: Routes.note_index_path(@socket, :index)) %>