Fix the form components to show the flash component for Book and Author.

dev
KKlochko 2 months ago
parent 4de9c62939
commit 638c6c3bd1

@ -79,7 +79,7 @@ defmodule DecentralisedBookIndexWeb.AuthorLive.FormComponent do
socket =
socket
|> 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}

@ -256,7 +256,7 @@ defmodule DecentralisedBookIndexWeb.BookLive.FormComponent do
socket =
socket
|> 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}

Loading…
Cancel
Save