Fix question counting for quiz component

This commit is contained in:
Alex Lion
2025-03-08 09:27:49 +01:00
parent ccdd31ae1a
commit 6813db7b5a

View File

@@ -33,10 +33,10 @@
if(i == 0, do: "rounded-tl-md")
]}
>
<%= i %>
<%= i+1 %>
</button>
<% end %>
<%= if Ecto.Changeset.get_field(@changeset, :quiz_questions) |> length() <= 10 do %>
<%= if Ecto.Changeset.get_field(@changeset, :quiz_questions) |> length() < 10 do %>
<button
type="button"
phx-click="add_quiz_question"