From a9b961ad03f69ed7e5b804c13a5a58e66e3f0d09 Mon Sep 17 00:00:00 2001 From: lashman Date: Mon, 13 Apr 2026 19:53:03 +0300 Subject: [PATCH] eager-mount discover hero and first row, preload deeper rows with 1600px margin --- src/components/ui/LazyMount.tsx | 4 ++-- src/pages/DiscoverPage.tsx | 24 ++++++++++++------------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/components/ui/LazyMount.tsx b/src/components/ui/LazyMount.tsx index 2dddb2c..1fa3fe0 100644 --- a/src/components/ui/LazyMount.tsx +++ b/src/components/ui/LazyMount.tsx @@ -46,8 +46,8 @@ interface Props { export default function LazyMount({ children, placeholder, - mountMargin = '1600px', - unmountMargin = '2400px', + mountMargin = '600px', + unmountMargin = '1500px', className, }: Props) { const ref = useRef(null) diff --git a/src/pages/DiscoverPage.tsx b/src/pages/DiscoverPage.tsx index 1ba50bb..91e26c9 100644 --- a/src/pages/DiscoverPage.tsx +++ b/src/pages/DiscoverPage.tsx @@ -96,7 +96,7 @@ export default function DiscoverPage() { ) : ( <> - +
@@ -115,26 +115,26 @@ export default function DiscoverPage() {
{kind === 'movie' ? ( <> - - - - - + + + + + ) : ( <> - - - + + + )}
- {kind === 'movie' && } + {kind === 'movie' && } - {kind === 'movie' && } + {kind === 'movie' && } - {kind === 'movie' && } + {kind === 'movie' && }