initial book review schema
This commit is contained in:
parent
e218290e08
commit
90414e6b93
15 changed files with 653 additions and 0 deletions
21
lib/wild_web/live/book_read_live/show.ex
Normal file
21
lib/wild_web/live/book_read_live/show.ex
Normal file
|
@ -0,0 +1,21 @@
|
|||
defmodule WildWeb.BookReadLive.Show do
|
||||
use WildWeb, :live_view
|
||||
|
||||
alias Wild.BookReads
|
||||
|
||||
@impl true
|
||||
def mount(_params, _session, socket) do
|
||||
{:ok, socket}
|
||||
end
|
||||
|
||||
@impl true
|
||||
def handle_params(%{"id" => id}, _, socket) do
|
||||
{:noreply,
|
||||
socket
|
||||
|> assign(:page_title, page_title(socket.assigns.live_action))
|
||||
|> assign(:book_read, BookReads.get_book_read!(id))}
|
||||
end
|
||||
|
||||
defp page_title(:show), do: "Show Book read"
|
||||
defp page_title(:edit), do: "Edit Book read"
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue