defmodule CanneryWeb.Components.UserCard do @moduledoc """ Display card for a user """ use CanneryWeb, :component alias Cannery.Accounts.User attr :user, User, required: true slot(:inner_block, required: true) def user_card(assigns) do ~H"""
<%= if @user.confirmed_at do %> <%= gettext( "User was confirmed at%{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 %>