From d00ed5c2dcf45b43d7f52a828d4f7b234163d3dd Mon Sep 17 00:00:00 2001 From: Zach Daniel Date: Sun, 15 Sep 2024 01:18:56 -0400 Subject: [PATCH] chore: remove old code --- lib/ash_hq_web/pages/home.ex | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/lib/ash_hq_web/pages/home.ex b/lib/ash_hq_web/pages/home.ex index 928948f..93fcc7c 100644 --- a/lib/ash_hq_web/pages/home.ex +++ b/lib/ash_hq_web/pages/home.ex @@ -486,12 +486,7 @@ defmodule AshHqWeb.Pages.Home do socket, signed_up: false, contributor_count: Enum.count(contributors), - contributors: contributors, - email_form: - AshPhoenix.Form.for_create(AshHq.MailingList.Email, :create, - upsert?: true, - upsert_identity: :unique_email - ) + contributors: contributors )} end @@ -503,21 +498,6 @@ defmodule AshHqWeb.Pages.Home do end end - def handle_event("validate_email_form", %{"form" => form}, socket) do - {:noreply, - assign(socket, email_form: AshPhoenix.Form.validate(socket.assigns.email_form, form))} - end - - def handle_event("submit_email_form", _, socket) do - case AshPhoenix.Form.submit(socket.assigns.email_form) do - {:ok, _} -> - {:noreply, assign(socket, :signed_up, true)} - - {:error, form} -> - {:noreply, assign(socket, email_form: form)} - end - end - @changeset_example """ post = Example.Post.create!(%{ text: "Declarative programming is fun!"