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

This commit is contained in:
2025-04-17 19:51:25 +03:00
parent 4de9c62939
commit 638c6c3bd1
2 changed files with 2 additions and 2 deletions
@@ -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}