use phoenix component modal

This commit is contained in:
2022-02-14 01:26:51 -05:00
parent f517ffc8f8
commit 114f63b47a
16 changed files with 193 additions and 150 deletions

View File

@ -125,12 +125,15 @@
</div>
<%= if @live_action in [:new, :edit] do %>
<%= live_modal(CanneryWeb.InviteLive.FormComponent,
id: @invite.id || :new,
title: @page_title,
action: @live_action,
invite: @invite,
return_to: Routes.invite_index_path(@socket, :index),
current_user: @current_user
) %>
<.modal return_to={Routes.invite_index_path(@socket, :index)}>
<.live_component
module={CanneryWeb.InviteLive.FormComponent}
id={@invite.id || :new}
title={@page_title}
action={@live_action}
invite={@invite}
return_to={Routes.invite_index_path(@socket, :index)}
current_user={@current_user}
/>
</.modal>
<% end %>