Fix the form components to show the flash component for Book and Author.
This commit is contained in:
@@ -79,7 +79,7 @@ defmodule DecentralisedBookIndexWeb.AuthorLive.FormComponent do
|
|||||||
socket =
|
socket =
|
||||||
socket
|
socket
|
||||||
|> put_flash(:info, "Author #{socket.assigns.form.source.type}d successfully")
|
|> put_flash(:info, "Author #{socket.assigns.form.source.type}d successfully")
|
||||||
|> push_redirect(to: patch_url(socket.assigns.action, author.id))
|
|> redirect(to: patch_url(socket.assigns.action, author.id))
|
||||||
|
|
||||||
{:noreply, socket}
|
{:noreply, socket}
|
||||||
|
|
||||||
|
|||||||
@@ -256,7 +256,7 @@ defmodule DecentralisedBookIndexWeb.BookLive.FormComponent do
|
|||||||
socket =
|
socket =
|
||||||
socket
|
socket
|
||||||
|> put_flash(:info, "Book #{socket.assigns.form.source.type}d successfully")
|
|> put_flash(:info, "Book #{socket.assigns.form.source.type}d successfully")
|
||||||
|> push_redirect(to: patch_url(socket.assigns.action, book.id))
|
|> redirect(to: patch_url(socket.assigns.action, book.id))
|
||||||
|
|
||||||
{:noreply, socket}
|
{:noreply, socket}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user