Code cleanup
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using RpgRoller.Components;
|
||||
using RpgRoller.Contracts;
|
||||
|
||||
namespace RpgRoller.Components.Pages;
|
||||
@@ -8,20 +7,10 @@ namespace RpgRoller.Components.Pages;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public partial class Home
|
||||
{
|
||||
private HomeViewMode CurrentView { get; set; } = HomeViewMode.Loading;
|
||||
private string? StatusMessage { get; set; }
|
||||
private bool StatusIsError { get; set; }
|
||||
private bool HasInitialized { get; set; }
|
||||
|
||||
[Inject]
|
||||
private RpgRollerApiClient ApiClient { get; set; } = default!;
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
if (!firstRender || HasInitialized)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
HasInitialized = true;
|
||||
await InitializeAsync();
|
||||
@@ -78,4 +67,12 @@ public partial class Home
|
||||
StatusMessage = null;
|
||||
StatusIsError = false;
|
||||
}
|
||||
}
|
||||
|
||||
private HomeViewMode CurrentView { get; set; } = HomeViewMode.Loading;
|
||||
private string? StatusMessage { get; set; }
|
||||
private bool StatusIsError { get; set; }
|
||||
private bool HasInitialized { get; set; }
|
||||
|
||||
[Inject]
|
||||
private RpgRollerApiClient ApiClient { get; set; } = null!;
|
||||
}
|
||||
Reference in New Issue
Block a user