Skip to content

Commit

Permalink
testing performance speed
Browse files Browse the repository at this point in the history
  • Loading branch information
jonolane committed Dec 14, 2023
1 parent b84174e commit c5201e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gatsby-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export const wrapRootElement = ({ element }) => {


// accounting for black body. removed z-index: -1;
/*
export const onInitialClientRender = () => {
const applyDelayedStyles = () => {
const styleElement = document.createElement('style');
Expand All @@ -17,12 +18,13 @@ export const onInitialClientRender = () => {
position: fixed;
inset: 0;
background-color: #111111;
// z-index: -1; ?
}
`;
document.head.appendChild(styleElement);
};
setTimeout(applyDelayedStyles, 4000);
console.log("onInitialClientRender complete");
};
};
*/
2 changes: 2 additions & 0 deletions gatsby-ssr.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const onInitialClientRender = () => {
// ideal time probably two seconds if I can get it to stop displaying immmediately

// seeing if this works on phone
/*
export const onRenderBody = ({ setPostBodyComponents }) => {
setPostBodyComponents([
<script
Expand All @@ -52,3 +53,4 @@ export const onRenderBody = ({ setPostBodyComponents }) => {
/>,
]);
};
*/

0 comments on commit c5201e5

Please sign in to comment.