From a2d70d783f6b967b1bdb5cc85ca22e9db2c35fdc Mon Sep 17 00:00:00 2001
From: Rui Saraiva
Date: Thu, 7 Jul 2022 11:29:08 +0100
Subject: [PATCH] fix: remove initial background flash
---
pages/_document.tsx | 8 ++++----
public/js/onload.js | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/pages/_document.tsx b/pages/_document.tsx
index aad13d7..a0d4dd6 100644
--- a/pages/_document.tsx
+++ b/pages/_document.tsx
@@ -4,13 +4,13 @@ import Document, { Html, Head, Main, NextScript } from 'next/document'
class MyDocument extends Document {
render() {
return (
-
+
-
-
+
+
-
+
)
diff --git a/public/js/onload.js b/public/js/onload.js
index aa89e75..80223b7 100644
--- a/public/js/onload.js
+++ b/public/js/onload.js
@@ -1,5 +1,5 @@
;(function () {
window.addEventListener('load', function () {
- document.body.classList.remove('preload')
+ document.documentElement.classList.remove('preload')
})
})()