diff --git a/platforms/pictique/src/lib/ui/Avatar/Avatar.svelte b/platforms/pictique/src/lib/ui/Avatar/Avatar.svelte index ebe92acd..9b2702ad 100644 --- a/platforms/pictique/src/lib/ui/Avatar/Avatar.svelte +++ b/platforms/pictique/src/lib/ui/Avatar/Avatar.svelte @@ -29,8 +29,6 @@ hasError = true; img = '/images/user.png'; } - - $inspect(img); {#if hasError || !img} diff --git a/platforms/pictique/src/routes/(protected)/home/+page.svelte b/platforms/pictique/src/routes/(protected)/home/+page.svelte index 5da60b17..bec15108 100644 --- a/platforms/pictique/src/routes/(protected)/home/+page.svelte +++ b/platforms/pictique/src/routes/(protected)/home/+page.svelte @@ -31,6 +31,9 @@ let isDrawerOpen = $state(false); const sentinel = (node: HTMLElement) => { + // The sentinel is a direct child of the scrollable ul + const scrollContainer = node.parentElement; + const observer = new IntersectionObserver( (entries) => { for (const entry of entries) { @@ -40,12 +43,16 @@ const loadingMore = get(isLoadingMore); if (hasMorePosts && !loading && !loadingMore) { + console.log('Triggering loadMoreFeed'); loadMoreFeed(); } } } }, - { rootMargin: '200px' } + { + root: scrollContainer as HTMLElement, + rootMargin: '200px' + } ); observer.observe(node); @@ -115,7 +122,7 @@ -