From d758caa00e7b030a4f0c0871b5d93aabd40d37ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Artur=20Zi=C4=99tkiewicz?= Date: Tue, 26 Sep 2023 10:29:20 +0200 Subject: [PATCH] Get rid of deprecated live_component/2 --- .../live/dashboard/dashboard_live/dashboard_live.html.heex | 2 +- .../plural_translation_form/plural_translation_form.html.heex | 2 +- .../singular_translation_form.html.heex | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/kanta_web/live/dashboard/dashboard_live/dashboard_live.html.heex b/lib/kanta_web/live/dashboard/dashboard_live/dashboard_live.html.heex index b2903f1..696816a 100644 --- a/lib/kanta_web/live/dashboard/dashboard_live/dashboard_live.html.heex +++ b/lib/kanta_web/live/dashboard/dashboard_live/dashboard_live.html.heex @@ -45,7 +45,7 @@
<%= 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 %>
diff --git a/lib/kanta_web/live/translations/translation_form_live/components/plural_translation_form/plural_translation_form.html.heex b/lib/kanta_web/live/translations/translation_form_live/components/plural_translation_form/plural_translation_form.html.heex index 2cd0c28..33b6534 100644 --- a/lib/kanta_web/live/translations/translation_form_live/components/plural_translation_form/plural_translation_form.html.heex +++ b/lib/kanta_web/live/translations/translation_form_live/components/plural_translation_form/plural_translation_form.html.heex @@ -85,7 +85,7 @@
<%= 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 %>
diff --git a/lib/kanta_web/live/translations/translation_form_live/components/singular_translation_form/singular_translation_form.html.heex b/lib/kanta_web/live/translations/translation_form_live/components/singular_translation_form/singular_translation_form.html.heex index eda8041..3cd2f0e 100644 --- a/lib/kanta_web/live/translations/translation_form_live/components/singular_translation_form/singular_translation_form.html.heex +++ b/lib/kanta_web/live/translations/translation_form_live/components/singular_translation_form/singular_translation_form.html.heex @@ -79,7 +79,7 @@
<%= 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 %>