From cad5758ce9cc38d4a735c8037bb2268ff464f8de Mon Sep 17 00:00:00 2001 From: KKlochko Date: Wed, 26 Mar 2025 11:55:37 +0200 Subject: [PATCH] Update the Show LiveView to redirect to Edit Liveview for Author. --- .../live/author_live/show.ex | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/lib/decentralised_book_index_web/live/author_live/show.ex b/lib/decentralised_book_index_web/live/author_live/show.ex index 42a0ee1..fcb40d3 100644 --- a/lib/decentralised_book_index_web/live/author_live/show.ex +++ b/lib/decentralised_book_index_web/live/author_live/show.ex @@ -9,7 +9,7 @@ defmodule DecentralisedBookIndexWeb.AuthorLive.Show do <:subtitle>This is a author record from your database. <:actions> - <.link patch={~p"/authors/#{@author}/show/edit"} phx-click={JS.push_focus()}> + <.link navigate={~p"/authors/#{@author}/edit"}> <.button>Edit author @@ -26,23 +26,6 @@ defmodule DecentralisedBookIndexWeb.AuthorLive.Show do <.back navigate={~p"/authors"}>Back to authors - - <.modal - :if={@live_action == :edit} - id="author-modal" - show - on_cancel={JS.patch(~p"/authors/#{@author}")} - > - <.live_component - module={DecentralisedBookIndexWeb.AuthorLive.FormComponent} - id={@author.id} - title={@page_title} - action={@live_action} - current_user={@current_user} - author={@author} - patch={~p"/authors/#{@author}"} - /> - """ end