Skip to content

Commit fc46101

Browse files
authored
feat: showing user icon looks better when avatar is null or empty. (#75)
When avatar is null or empty showing user icon looks better.
1 parent f035012 commit fc46101

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/layout/src/RightContent/AvatarDropdown.razor

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,16 @@
2424
</Overlay>
2525
<Unbound>
2626
<span @ref="@context.Current" class="action account">
27-
<Avatar Size="small" Class="avatar" Src="@Avatar" Alt="avatar" />
27+
28+
@if (string.IsNullOrEmpty(Avatar))
29+
{
30+
<Avatar Size="small" Icon="user" />
31+
}
32+
else
33+
{
34+
<Avatar Size="small" Class="avatar" Src="@Avatar" Alt="avatar" />
35+
}
36+
2837
<span class="name anticon">@Name</span>
2938
</span>
3039
</Unbound>

0 commit comments

Comments
 (0)