AppSettings.ApiUrl

This commit is contained in:
2023-01-19 16:45:16 -07:00
parent a4d3a9899f
commit 10c823dca8
10 changed files with 202 additions and 39 deletions

View File

@ -7,6 +7,7 @@ public partial class RunHeaders
{
[Inject] protected IJSRuntime? JSRuntime { get; set; }
[Inject] protected Models.AppSettings? AppSettings { get; set; }
protected override Task OnAfterRenderAsync(bool firstRender)
{
@ -14,7 +15,9 @@ public partial class RunHeaders
{
if (JSRuntime is null)
throw new NullReferenceException(nameof(JSRuntime));
return JSRuntime.InvokeVoidAsync("initRunHeaders").AsTask();
if (AppSettings is null)
throw new NullReferenceException(nameof(AppSettings));
return JSRuntime.InvokeVoidAsync("initRunHeaders", AppSettings.ApiUrl).AsTask();
}
return Task.CompletedTask;
}