Centralize role preloading in global LiveView on_mount
Add ensure_user_role_loaded to global live_view quote block. Remove redundant on_mount calls from individual LiveViews.
This commit is contained in:
parent
fb5f4990b8
commit
3852c93ac9
12 changed files with 2 additions and 18 deletions
|
|
@ -17,8 +17,6 @@ defmodule MvWeb.RoleLive.Form do
|
|||
|
||||
import MvWeb.RoleLive.Helpers, only: [format_error: 1]
|
||||
|
||||
on_mount {MvWeb.LiveHelpers, :ensure_user_role_loaded}
|
||||
|
||||
@impl true
|
||||
def render(assigns) do
|
||||
~H"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue