added defensive logic to app.razor, relocated shared resource definition in preparation for utilizing shared resources

This commit is contained in:
Shaun Walker
2021-06-14 17:29:23 -04:00
parent 643895b62b
commit 28694fc11f
7 changed files with 36 additions and 78 deletions

View File

@ -40,7 +40,14 @@
var interop = new Interop(JSRuntime);
SiteState.AntiForgeryToken = await interop.GetElementByName(Constants.RequestVerificationToken);
_installation = await InstallationService.IsInstalled();
SiteState.Alias = _installation.Alias;
if (_installation.Alias != null)
{
SiteState.Alias = _installation.Alias;
}
else
{
_installation.Message = "Site Not Configured Correctly - No Matching Alias Exists For Host Name";
}
_initialized = true;
StateHasChanged();
}