Skip to content

Commit

Permalink
Get rid of deprecated live_component/2
Browse files Browse the repository at this point in the history
  • Loading branch information
arturz committed Sep 26, 2023
1 parent a749f3f commit d758caa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<div class="grid grid-cols-4 gap-4">
<%= for {plugin_name, _} <- Kanta.config().plugins do %>
<%= if plugin_name |> Module.concat(DashboardComponent) |> module_exists?() do %>
<%= live_component(Module.concat(plugin_name, DashboardComponent), id: plugin_name) %>
<.live_component module={Module.concat(plugin_name, DashboardComponent)} id={plugin_name} />
<% end %>
<% end %>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
<div class=" mt-4 bg-white dark:bg-stone-900 rounded-lg shadow-md px-4 py-4 col-span-2 lg:col-span-1 space-y-2">
<%= for {plugin_name, _} <- Kanta.config().plugins do %>
<%= if plugin_name |> Module.concat(FormComponent) |> module_exists?() do %>
<%= live_component(Module.concat(plugin_name, FormComponent), id: plugin_name, message: @message, locale: @locale, translation: @translation) %>
<.live_component module={Module.concat(plugin_name, FormComponent)} id={plugin_name} message={@message} locale={@locale} translation={@translation} />
<% end %>
<% end %>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
<div class=" mt-4 bg-white dark:bg-stone-900 rounded-lg shadow-md px-4 py-4 col-span-2 lg:col-span-1 space-y-2">
<%= for {plugin_name, _} <- Kanta.config().plugins do %>
<%= if plugin_name |> Module.concat(FormComponent) |> module_exists?() do %>
<%= live_component(Module.concat(plugin_name, FormComponent), id: plugin_name, message: @message, locale: @locale, translation: @translation) %>
<.live_component module={Module.concat(plugin_name, FormComponent)} id={plugin_name} message={@message} locale={@locale} translation={@translation} />
<% end %>
<% end %>
</div>
Expand Down

0 comments on commit d758caa

Please sign in to comment.