Skip to content

Commit

Permalink
chore: use compose_child instead of update_child for content page form
Browse files Browse the repository at this point in the history
  • Loading branch information
MelchiorKokernoot committed Oct 24, 2024
1 parent 5ce088c commit 775b753
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/systems/assignment/content_page_form.ex
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,14 @@ defmodule Systems.Assignment.ContentPageForm do
%{status: :on},
%{assigns: %{assignment: assignment, page_key: page_key}} = socket
) do
page_ref = Assignment.Public.create_page_ref(assignment, page_key)
{:ok, %{assignment_page_ref: page_ref}} =
Assignment.Public.create_page_ref(assignment, page_key)

{
:noreply,
socket
|> assign(page_ref: page_ref)
|> update_child(:content_page_form)
|> compose_child(:content_page_form)
}
end

Expand Down

0 comments on commit 775b753

Please sign in to comment.