diff --git a/lib/cannery_web/live/ammo_group_live/form_component.html.heex b/lib/cannery_web/live/ammo_group_live/form_component.html.heex
index bd47fed5..0e6bbcf9 100644
--- a/lib/cannery_web/live/ammo_group_live/form_component.html.heex
+++ b/lib/cannery_web/live/ammo_group_live/form_component.html.heex
@@ -12,7 +12,7 @@
phx-submit="save"
class="grid grid-cols-3 justify-center items-center space-y-4"
>
- <%= if @changeset.action do %>
+ <%= unless @changeset.valid? do %>
<%= changeset_errors(@changeset) %>
diff --git a/lib/cannery_web/live/ammo_type_live/form_component.html.heex b/lib/cannery_web/live/ammo_type_live/form_component.html.heex
index 1f0f96c7..654927bb 100644
--- a/lib/cannery_web/live/ammo_type_live/form_component.html.heex
+++ b/lib/cannery_web/live/ammo_type_live/form_component.html.heex
@@ -11,7 +11,7 @@
phx-submit="save"
class="grid grid-cols-3 justify-center items-center space-y-4"
>
- <%= if @changeset.action do %>
+ <%= unless @changeset.valid? do %>
<%= changeset_errors(@changeset) %>
diff --git a/lib/cannery_web/live/container_live/form_component.html.heex b/lib/cannery_web/live/container_live/form_component.html.heex
index 2b5f438e..32f6fa55 100644
--- a/lib/cannery_web/live/container_live/form_component.html.heex
+++ b/lib/cannery_web/live/container_live/form_component.html.heex
@@ -11,7 +11,7 @@
phx-change="validate"
phx-submit="save"
>
- <%= if @changeset.action do %>
+ <%= unless @changeset.valid? do %>
<%= changeset_errors(@changeset) %>
diff --git a/lib/cannery_web/live/invite_live/form_component.html.heex b/lib/cannery_web/live/invite_live/form_component.html.heex
index 13b7c5d6..3a204adb 100644
--- a/lib/cannery_web/live/invite_live/form_component.html.heex
+++ b/lib/cannery_web/live/invite_live/form_component.html.heex
@@ -11,7 +11,7 @@
phx-change="validate"
phx-submit="save"
>
- <%= if @changeset.action do %>
+ <%= unless @changeset.valid? do %>
<%= changeset_errors(@changeset) %>
diff --git a/lib/cannery_web/live/tag_live/form_component.ex b/lib/cannery_web/live/tag_live/form_component.ex
index feb648ed..8ed6a033 100644
--- a/lib/cannery_web/live/tag_live/form_component.ex
+++ b/lib/cannery_web/live/tag_live/form_component.ex
@@ -41,7 +41,7 @@ defmodule CanneryWeb.TagLive.FormComponent do
phx-change="validate"
phx-submit="save"
>
- <%= if @changeset.action do %>
+ <%= unless @changeset.valid? do %>
<%= changeset_errors(@changeset) %>
diff --git a/lib/cannery_web/live/tag_live/index.ex b/lib/cannery_web/live/tag_live/index.ex
index e8ceb8a5..12565d7e 100644
--- a/lib/cannery_web/live/tag_live/index.ex
+++ b/lib/cannery_web/live/tag_live/index.ex
@@ -37,9 +37,7 @@ defmodule CanneryWeb.TagLive.Index do
@impl true
def handle_event("delete", %{"id" => id}, %{assigns: %{current_user: current_user}} = socket) do
%{name: tag_name} = Tags.get_tag!(id, current_user) |> Tags.delete_tag!(current_user)
-
prompt = dgettext("prompts", "%{name} deleted succesfully", name: tag_name)
-
{:noreply, socket |> put_flash(:info, prompt) |> display_tags()}
end
diff --git a/lib/cannery_web/templates/user_registration/new.html.heex b/lib/cannery_web/templates/user_registration/new.html.heex
index 9b2fcadd..fe87f270 100644
--- a/lib/cannery_web/templates/user_registration/new.html.heex
+++ b/lib/cannery_web/templates/user_registration/new.html.heex
@@ -7,7 +7,7 @@
Routes.user_registration_path(@conn, :create),
[class: "flex flex-col justify-center items-center space-y-4"],
fn f -> %>
- <%= if @changeset.action do %>
+ <%= unless @changeset.valid? do %>
<%= dgettext("errors", "Oops, something went wrong! Please check the errors below.") %>
diff --git a/lib/cannery_web/templates/user_reset_password/edit.html.heex b/lib/cannery_web/templates/user_reset_password/edit.html.heex
index 6adebafe..acf55ad9 100644
--- a/lib/cannery_web/templates/user_reset_password/edit.html.heex
+++ b/lib/cannery_web/templates/user_reset_password/edit.html.heex
@@ -7,7 +7,7 @@
Routes.user_reset_password_path(@conn, :update, @token),
[class: "flex flex-col justify-center items-center space-y-4"],
fn f -> %>
- <%= if @changeset.action do %>
+ <%= unless @changeset.valid? do %>
<%= dgettext("errors", "Oops, something went wrong! Please check the errors below.") %>