Delete Account
Once your account is deleted, all of its resources and data will be permanently deleted. Before deleting your account, please download any data or information that you wish to retain.
<%= render(DangerButtonComponent.new({"x-data": "", "x-on:click.prevent": "$dispatch('open-modal', 'confirm-user-deletion')"})) do %>
Delete Account
<% end %>
<%= render(ModalComponent.new({ :name => "confirm-user-deletion", :show => @delete_user_form.error_messages.has_key?(:password), :focusable => true })) do %>
<%= form_with model: @delete_user_form, url: profile_destroy_path, method: "delete", class: "p-6" do %>
Are you sure you want to delete your account?
Once your account is deleted, all of its resources and data will be permanently deleted. Please enter your password to confirm you would like to permanently delete your account.
<%= render(InputLabelComponent.new({ for: "password", value: "Password", class: "sr-only" })) %>
<%= render(TextInputComponent.new({ id: "password", class: "mt-1 block w-3/4", type: "password", name: "password", placeholder: "Password" })) %>
<%= render(InputErrorComponent.new({ class: "mt-2", message: @delete_user_form.error_messages[:password] })) %>
<%= render(SecondaryButtonComponent.new({ "x-on:click": "$dispatch('close')" })) do %>
Cancel
<% end %>
<%= render(DangerButtonComponent.new({ class: "ms-3" })) do %>
Delete Account
<% end %>
<% end %>
<% end %>