add locale as per user setting

This commit is contained in:
2022-05-05 23:26:29 -04:00
parent 42b4d0758f
commit 4b420f313c
27 changed files with 324 additions and 170 deletions

View File

@ -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()