From 52f8b51203e83e1c9cf2ddf3b737d3ba80a7af43 Mon Sep 17 00:00:00 2001 From: Ariel Juodziukynas Date: Sun, 29 Oct 2023 12:03:19 -0300 Subject: [PATCH] Electron 27: fix galery lazy load --- src/frontend/App.css | 7 ++----- .../screens/Library/components/GamesList/index.tsx | 3 +-- src/frontend/screens/Library/index.tsx | 1 - 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/frontend/App.css b/src/frontend/App.css index 38cb534318..ed2b99ea97 100644 --- a/src/frontend/App.css +++ b/src/frontend/App.css @@ -16,11 +16,8 @@ /* Measurements */ } -body, -html, -#root, -.App { - min-height: 100vh; +body { + height: 100vh; } .App { diff --git a/src/frontend/screens/Library/components/GamesList/index.tsx b/src/frontend/screens/Library/components/GamesList/index.tsx index 6029794ba0..ed97cf3ca1 100644 --- a/src/frontend/screens/Library/components/GamesList/index.tsx +++ b/src/frontend/screens/Library/components/GamesList/index.tsx @@ -34,7 +34,6 @@ const GamesList = ({ useEffect(() => { if (library.length) { const options = { - root: document.querySelector('.listing'), rootMargin: '500px', threshold: 0 } @@ -54,7 +53,7 @@ const GamesList = ({ } }) - // dispatch an event with the newley visible cards + // dispatch an event with the newly visible cards // check GameCard for the other side of this detection window.dispatchEvent( new CustomEvent('visible-cards', { detail: { appNames: entered } }) diff --git a/src/frontend/screens/Library/index.tsx b/src/frontend/screens/Library/index.tsx index 10fa571bf6..5a23c530c9 100644 --- a/src/frontend/screens/Library/index.tsx +++ b/src/frontend/screens/Library/index.tsx @@ -390,7 +390,6 @@ export default React.memo(function Library(): JSX.Element { // adding a timeout so we don't run this for every resize event timer = setTimeout(() => { - console.log('fired') const header = document.querySelector('.Header') if (header) { const headerHeight = header.getBoundingClientRect().height