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
797452a76e
commit
47c938cc50
12 changed files with 2 additions and 18 deletions
|
|
@ -33,7 +33,6 @@ defmodule MvWeb.UserLive.Form do
|
|||
"""
|
||||
use MvWeb, :live_view
|
||||
|
||||
on_mount {MvWeb.LiveHelpers, :ensure_user_role_loaded}
|
||||
import MvWeb.LiveHelpers, only: [current_actor: 1, submit_form: 3]
|
||||
|
||||
@impl true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue