forked from shibao/cannery
add locale as per user setting
This commit is contained in:
@ -10,9 +10,7 @@ defmodule CanneryWeb.InviteLive.Index do
|
||||
alias Phoenix.LiveView.JS
|
||||
|
||||
@impl true
|
||||
def mount(_params, session, socket) do
|
||||
%{assigns: %{current_user: current_user}} = socket = socket |> assign_defaults(session)
|
||||
|
||||
def mount(_params, _session, %{assigns: %{current_user: current_user}} = socket) do
|
||||
socket =
|
||||
if current_user |> Map.get(:role) == :admin do
|
||||
socket |> display_invites()
|
||||
|
Reference in New Issue
Block a user