Skip to content

Commit

Permalink
feat: load SECTIONS_OUT_OF_VIEWPORT without ViewportObserver
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardoformiga committed Dec 19, 2024
1 parent b3e73c5 commit 3dc6887
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/core/src/components/cms/RenderSections.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ export const LazyLoadingSection = ({
sectionName: string
children: ReactNode
}) => {
if (SECTIONS_OUT_OF_VIEWPORT.includes(sectionName)) {
return <>{children}</>
}

return (
<ViewportObserver sectionName={sectionName}>{children}</ViewportObserver>
)
Expand Down

0 comments on commit 3dc6887

Please sign in to comment.