remove non-referring close button from modal
This commit is contained in:
		| @@ -37,8 +37,6 @@ defmodule CanneryWeb.LiveHelpers do | |||||||
|       </.modal> |       </.modal> | ||||||
|   """ |   """ | ||||||
|   def modal(assigns) do |   def modal(assigns) do | ||||||
|     assigns = assign_new(assigns, :return_to, fn -> nil end) |  | ||||||
|  |  | ||||||
|     ~H""" |     ~H""" | ||||||
|     <div |     <div | ||||||
|       id="modal" |       id="modal" | ||||||
| @@ -57,23 +55,12 @@ defmodule CanneryWeb.LiveHelpers do | |||||||
|         phx-window-keydown={hide_modal()} |         phx-window-keydown={hide_modal()} | ||||||
|         phx-key="escape" |         phx-key="escape" | ||||||
|       > |       > | ||||||
|         <%= if @return_to do %> |         <%= live_patch to: @return_to, | ||||||
|           <%= live_patch to: @return_to, |                     id: "close", | ||||||
|                      id: "close", |                     class: | ||||||
|                      class: |                       "absolute top-8 right-10 text-gray-500 hover:text-gray-800 transition-all duration-500 ease-in-out", | ||||||
|                        "absolute top-8 right-10 text-gray-500 hover:text-gray-800 transition-all duration-500 ease-in-out", |                     phx_click: hide_modal() do %> | ||||||
|                      phx_click: hide_modal() do %> |           <i class="fa-fw fa-lg fas fa-times"></i> | ||||||
|             <i class="fa-fw fa-lg fas fa-times"></i> |  | ||||||
|           <% end %> |  | ||||||
|         <% else %> |  | ||||||
|           <a |  | ||||||
|             id="close" |  | ||||||
|             href="#" |  | ||||||
|             class="absolute top-8 right-10 text-gray-500 hover:text-gray-800 transition-all duration-500 ease-in-out" |  | ||||||
|             phx-click={hide_modal()} |  | ||||||
|           > |  | ||||||
|             <i class="fa-fw fa-lg fas fa-times"></i> |  | ||||||
|           </a> |  | ||||||
|         <% end %> |         <% end %> | ||||||
|  |  | ||||||
|         <div class="p-8 flex flex-col space-y-4 justify-start items-center"> |         <div class="p-8 flex flex-col space-y-4 justify-start items-center"> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user