move stylesheet injection to App component to eliminate FOUC on static rendering

This commit is contained in:
sbwalker
2024-02-20 10:16:19 -05:00
parent 4fad97e8b1
commit 0f0d168976
4 changed files with 103 additions and 55 deletions

View File

@ -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 =>