defmodule MemexWeb.Components.UserCard do @moduledoc """ Display card for a user """ use MemexWeb, :component def user_card(assigns) do ~H"""

<%= @user.email %>

<%= if @user.confirmed_at do %> <%= gettext( "user confirmed on%{confirmed_datetime}", confirmed_datetime: "" ) %> <.datetime datetime={@user.confirmed_at} /> <% else %> <%= gettext("email unconfirmed") %> <% end %>

<%= gettext( "user registered on%{registered_datetime}", registered_datetime: "" ) %> <.datetime datetime={@user.inserted_at} />

<%= if @inner_block do %>
<%= render_slot(@inner_block) %>
<% end %>
""" end end