2022-07-18 15:16:57 +02:00
|
|
|
<div class="user-box">
|
2022-05-23 15:57:15 +02:00
|
|
|
<%= if @current_user do %>
|
|
|
|
<h4 class="w-full"><%= @current_user.email %></h4>
|
|
|
|
<%= link "Settings", class: "link",
|
|
|
|
to: Routes.user_settings_path(@conn, :edit) %>
|
|
|
|
<%= button "Log out", class: "btn btn-sm",
|
|
|
|
to: Routes.user_session_path(@conn, :delete), method: :delete %>
|
|
|
|
<% else %>
|
|
|
|
<%= link "Register", class: "link",
|
|
|
|
to: Routes.user_registration_path(@conn, :new) %>
|
|
|
|
<%= button "Log in", class: "btn btn-sm",
|
|
|
|
to: Routes.user_session_path(@conn, :new) %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|