move stylesheet injection to App component to eliminate FOUC on static rendering
This commit is contained in:
@ -101,8 +101,8 @@
|
||||
_error = "";
|
||||
|
||||
Route route = new Route(_absoluteUri, SiteState.Alias.Path);
|
||||
int moduleid = (int.TryParse(route.ModuleId, out moduleid)) ? moduleid : -1;
|
||||
var action = (!string.IsNullOrEmpty(route.Action)) ? route.Action : Constants.DefaultAction;
|
||||
int moduleid = int.Parse(route.ModuleId);
|
||||
var action = route.Action;
|
||||
|
||||
var querystring = Utilities.ParseQueryString(route.Query);
|
||||
var returnurl = "";
|
||||
|
@ -53,15 +53,6 @@
|
||||
{
|
||||
headcontent = AddHeadContent(headcontent, PageState.Page.HeadContent);
|
||||
}
|
||||
|
||||
// stylesheets and scripts on static rendering
|
||||
if (PageState.RenderMode == RenderModes.Static)
|
||||
{
|
||||
headcontent = AddHeadContent(headcontent, ManageStyleSheets(PageState.Page.Resources, PageState.Alias));
|
||||
headcontent = AddHeadContent(headcontent, ManageScripts(PageState.Page.Resources, PageState.Alias));
|
||||
}
|
||||
|
||||
// send to Head component
|
||||
SiteState.Properties.HeadContent = headcontent;
|
||||
|
||||
DynamicComponent = builder =>
|
||||
|
Reference in New Issue
Block a user