@using LinkDotNet.Blog.Web.Features.Services @inject IOptions AppConfiguration @inject ICurrentUserService CurrentUserService @if (authorName is not null) { } else { } @code { [Parameter] public string CurrentUri { get; set; } = string.Empty; private string? authorName; protected override async Task OnInitializedAsync() { if (AppConfiguration.Value.UseMultiAuthorMode) { authorName = await CurrentUserService.GetDisplayNameAsync(); } } }