diff --git a/packages/atlas/src/hooks/useInfiniteVideoGrid.ts b/packages/atlas/src/hooks/useInfiniteVideoGrid.ts index 59abf15c5a..78c22a178a 100644 --- a/packages/atlas/src/hooks/useInfiniteVideoGrid.ts +++ b/packages/atlas/src/hooks/useInfiniteVideoGrid.ts @@ -49,10 +49,7 @@ export const useInfiniteVideoGrid = ({ const firstLoadPlaceholders = firstLoad ? createPlaceholderData(columns * initialRowsToLoad) : [] const displayedItems = dataConnection?.edges.map((edge) => edge.node) || [] - const itemsLeft = (dataConnection?.totalCount || 0) - (dataConnection?.edges?.length || 0) - const itemsToLoad = Math.min(itemsLeft, columns * 4) - - const nextLoadPlaceholders = !dataConnection?.pageInfo.hasNextPage || false ? [] : createPlaceholderData(itemsToLoad) + const nextLoadPlaceholders = dataConnection?.pageInfo.hasNextPage ? createPlaceholderData(columns * 4) : [] return { tiles: [...firstLoadPlaceholders, ...displayedItems, ...(loading ? nextLoadPlaceholders : [])],