implement step 2 stuff

This commit is contained in:
2021-12-04 16:57:47 -05:00
parent d32dc8c2cb
commit 5de53e23ea
14 changed files with 121 additions and 20 deletions

View File

@@ -15,9 +15,9 @@ defmodule EntenduWeb.LiveHelpers do
link: @link,
return_to: Routes.link_index_path(@socket, :index) %>
"""
def live_modal(socket, component, opts) do
def live_modal(_socket, component, opts) do
path = Keyword.fetch!(opts, :return_to)
modal_opts = [id: :modal, return_to: path, component: component, opts: opts]
live_component(socket, EntenduWeb.ModalComponent, modal_opts)
live_component(EntenduWeb.ModalComponent, modal_opts)
end
end