diff --git a/Oqtane.Client/App.razor b/Oqtane.Client/App.razor index 701faf81..c7998d71 100644 --- a/Oqtane.Client/App.razor +++ b/Oqtane.Client/App.razor @@ -2,7 +2,6 @@ @inject IInstallationService InstallationService @inject IJSRuntime JSRuntime @inject SiteState SiteState -@inject IServiceProvider ServiceProvider @if (_initialized) { @@ -56,24 +55,12 @@ private PageState PageState { get; set; } - private IHttpContextAccessor accessor; - protected override async Task OnParametersSetAsync() { SiteState.RemoteIPAddress = RemoteIPAddress; SiteState.AntiForgeryToken = AntiForgeryToken; SiteState.AuthorizationToken = AuthorizationToken; - accessor = (IHttpContextAccessor)ServiceProvider.GetService(typeof(IHttpContextAccessor)); - if (accessor != null) - { - SiteState.IsPrerendering = !accessor.HttpContext.Response.HasStarted; - } - else - { - SiteState.IsPrerendering = true; - } - _installation = await InstallationService.IsInstalled(); if (_installation.Alias != null) { diff --git a/Oqtane.Shared/Shared/SiteState.cs b/Oqtane.Shared/Shared/SiteState.cs index 50481f65..02232b7a 100644 --- a/Oqtane.Shared/Shared/SiteState.cs +++ b/Oqtane.Shared/Shared/SiteState.cs @@ -9,7 +9,6 @@ namespace Oqtane.Shared public string AntiForgeryToken { get; set; } // passed from server for use in service calls on client public string AuthorizationToken { get; set; } // passed from server for use in service calls on client public string RemoteIPAddress { get; set; } // passed from server as cannot be reliably retrieved on client - public bool IsPrerendering{ get; set; } private dynamic _properties; public dynamic Properties => _properties ?? (_properties = new PropertyDictionary());