using FoodsharingSiegen.Contracts.Entity;
using FoodsharingSiegen.Server.Auth;
using Microsoft.AspNetCore.Components;
namespace FoodsharingSiegen.Server.Shared
{
///
/// The nav menu class (a. beging, 07.02.2023)
///
public partial class NavMenu
{
#region Dependencies
///
/// Gets or sets the value of the auth service (ab)
///
[Inject] protected AuthService AuthService { get; set; } = null!;
#endregion
#region Private Properties
///
/// Gets the value of the current user (ab)
///
private User CurrentUser => AuthService.User ?? new User();
#endregion
#region Override OnInitializedAsync
///
/// Ons the initialized (a. beging, 07.02.2023)
///
protected override async Task OnInitializedAsync()
{
await AuthService.Initialize();
await base.OnInitializedAsync();
}
#endregion
}
}