use attrs for user card

This commit is contained in:
shibao 2023-02-26 00:37:17 -05:00
parent f8a1d88e0e
commit db2ec3b4a3
3 changed files with 10 additions and 6 deletions

View File

@ -4,6 +4,10 @@ defmodule LokalWeb.Components.UserCard do
"""
use LokalWeb, :component
alias Lokal.Accounts.User
attr :user, User, required: true
slot(:inner_block, required: true)
def user_card(assigns) do
~H"""

View File

@ -147,7 +147,7 @@ msgstr ""
msgid "Language"
msgstr ""
#: lib/lokal_web/components/user_card.ex:29
#: lib/lokal_web/components/user_card.ex:33
#, elixir-autogen, elixir-format
msgid "Email unconfirmed"
msgstr ""
@ -161,12 +161,12 @@ msgstr ""
msgid "Lokal"
msgstr ""
#: lib/lokal_web/components/user_card.ex:34
#: lib/lokal_web/components/user_card.ex:38
#, elixir-autogen, elixir-format
msgid "User registered on%{registered_datetime}"
msgstr ""
#: lib/lokal_web/components/user_card.ex:23
#: lib/lokal_web/components/user_card.ex:27
#, elixir-autogen, elixir-format
msgid "User was confirmed at%{confirmed_datetime}"
msgstr ""

View File

@ -147,7 +147,7 @@ msgstr ""
msgid "Language"
msgstr ""
#: lib/lokal_web/components/user_card.ex:29
#: lib/lokal_web/components/user_card.ex:33
#, elixir-autogen, elixir-format
msgid "Email unconfirmed"
msgstr ""
@ -161,12 +161,12 @@ msgstr ""
msgid "Lokal"
msgstr ""
#: lib/lokal_web/components/user_card.ex:34
#: lib/lokal_web/components/user_card.ex:38
#, elixir-autogen, elixir-format, fuzzy
msgid "User registered on%{registered_datetime}"
msgstr ""
#: lib/lokal_web/components/user_card.ex:23
#: lib/lokal_web/components/user_card.ex:27
#, elixir-autogen, elixir-format
msgid "User was confirmed at%{confirmed_datetime}"
msgstr ""