chiya/lib/chiya_web/live/user_profile_live.ex

32 lines
872 B
Elixir
Raw Permalink Normal View History

2023-03-07 21:24:24 +01:00
defmodule ChiyaWeb.UserProfileLive do
use ChiyaWeb, :live_view
def render(assigns) do
~H"""
<.header>
User Profile
<:actions>
<.link href={~p"/user/settings"}>
<.button>Edit User</.button>
</.link>
2023-07-04 06:57:32 +02:00
<.link
href={~p"/user/log_out"}
method="delete"
data-confirm="Do you want to logout?"
class="text-sm leading-6 text-gray-900 dark:text-gray-100 dark:hover:text-gray-300 hover:text-gray-700"
>
<.button>Log out</.button>
</.link>
2023-03-07 21:24:24 +01:00
</:actions>
</.header>
<.list>
2023-07-03 20:16:50 +02:00
<:item title="Name"><%= @current_user.name %></:item>
<:item title="Handle"><%= @current_user.handle %></:item>
<:item title="Bio"><%= @current_user.bio %></:item>
2023-03-07 21:24:24 +01:00
<:item title="Email"><%= @current_user.email %></:item>
</.list>
"""
end
2023-03-09 21:44:29 +01:00
end