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 |> is_nil() do %> <%= gettext("email unconfirmed") %> <% else %> <%= gettext( "user was confirmed at %{relative_datetime}", relative_datetime: @user.confirmed_at |> display_datetime() ) %> <% end %>

<%= gettext("User registered on") %> <%= @user.inserted_at |> display_datetime() %>

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