Skip to content

Commit

Permalink
Merge pull request #406 from petalframework/avatar_icon_bug
Browse files Browse the repository at this point in the history
User Dropdown Menu - `avatar_src` and `current_user_name` are optional
  • Loading branch information
mitkins authored Feb 22, 2025
2 parents bef2e38 + 4d7ea66 commit bf849b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/petal_components/user_dropdown_menu.ex
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ defmodule PetalComponents.UserDropdownMenu do
<.dropdown :if={@user_menu_items != []}>
<:trigger_element>
<div class="inline-flex items-center justify-center w-full align-middle focus:outline-none">
<%= if @current_user_name || @avatar_src do %>
<%= if assigns[:current_user_name] || assigns[:avatar_src] do %>
<.avatar name={@current_user_name} src={@avatar_src} size="sm" random_color />
<% else %>
<.avatar size="sm" />
Expand Down

0 comments on commit bf849b3

Please sign in to comment.