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 |> is_nil() do %> Email unconfirmed <% else %> User was confirmed at <%= @user.confirmed_at |> display_datetime() %> <% end %>
<%= gettext("User registered on") %> <%= @user.inserted_at |> display_datetime() %>
<%= if @inner_block do %>