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

<%= @user.email %>

<%= if @user.confirmed_at |> is_nil() do %> Email unconfirmed <% else %>

User was confirmed at

<%= @user.confirmed_at |> display_datetime() %> <% end %>

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