Skip to content

Commit

Permalink
Show user role in UI
Browse files Browse the repository at this point in the history
  • Loading branch information
r-tae committed Jun 26, 2024
1 parent d0997f8 commit ad5a75d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/signbank_web/components/layouts/root.html.heex
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@
<ul class="relative z-10 flex items-center gap-4 px-4 sm:px-6 lg:px-8 justify-end">
<%= if @current_user do %>
<li class="text-[0.8125rem] leading-6 text-zinc-900">
<%= @current_user.email %> (<%= if @current_user.role == :editor,
do: "Editor",
else: "Regular user" %>)
<%= @current_user.email %> (<%= case @current_user.role do
:editor -> "Editor"
:tech -> "Tech"
:none -> "Regular user"
end
%>)
</li>
<li>
<.link
Expand Down

0 comments on commit ad5a75d

Please sign in to comment.