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
|
|
@ -23,7 +23,6 @@ defmodule MvWeb.UserLive.Index do
|
|||
use MvWeb, :live_view
|
||||
import MvWeb.TableComponents
|
||||
|
||||
on_mount {MvWeb.LiveHelpers, :ensure_user_role_loaded}
|
||||
import MvWeb.LiveHelpers, only: [current_actor: 1]
|
||||
|
||||
@impl true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue