Last active
June 8, 2021 12:39
-
-
Save TeijiW/0d983759ca90e350daca49d4b83ff054 to your computer and use it in GitHub Desktop.
Codes for Medium article
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= if !@email do %> | |
<%= form_for :user, "#", [phx_submit: :login]\, fn f -> %> | |
<%= label f, :email, "E-mail" %> | |
<%= email_input f, :email, required: true %> | |
<%= if @email_input_error do %> | |
<span> <%= @email_input_error %> </span> | |
<% end %> | |
<%= submit "Continue" %> | |
<% end %> | |
<% end %> | |
<%= if @email && !@email_input_errors do %> | |
<%= form_for :user, Routes.user_session_path(@socket, :create), [as: :user], fn f -> %> | |
<%= hidden_input f, :email, value: @email %> | |
<%= label f, :code, "Code" %> | |
<%= text_input f, :code, required: true %> | |
<%= submit "Confirm code" %> | |
<% end %> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment