Skip to content

Commit

Permalink
feat: removes lazy without suspense from global sections (#2468)
Browse files Browse the repository at this point in the history
## What's the purpose of this pull request?

This PR is part of the Performance epic and aims to remove lazy
components/sections without a `Suspense` associated.

PSI snapshot

<img width="891" alt="Screenshot 2024-09-24 at 18 50 34"
src="https://github.com/user-attachments/assets/cabd13a6-8ccc-4fda-a1e6-8cbc1755c262">

## starter PR
- vtex-sites/starter.store#545
  • Loading branch information
eduardoformiga committed Sep 24, 2024
1 parent 8a64be2 commit 7a787be
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/core/src/components/cms/GlobalSections.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Locator, Section } from '@vtex/client-cms'
import storeConfig from 'faststore.config'
import type { ComponentType } from 'react'
import { PropsWithChildren, lazy } from 'react'
import { PropsWithChildren } from 'react'
import CUSTOM_COMPONENTS from 'src/customizations/src/components'
import { PageContentType, getPage } from 'src/server/cms'

Expand All @@ -13,8 +13,8 @@ import Footer from 'src/components/sections/Footer'
import { OverriddenDefaultNavbar as Navbar } from 'src/components/sections/Navbar/OverriddenDefaultNavbar'
import { OverriddenDefaultRegionBar as RegionBar } from 'src/components/sections/RegionBar/OverriddenDefaultRegionBar'

const RegionModal = lazy(() => import('src/components/region/RegionModal'))
const CartSidebar = lazy(() => import('src/components/cart/CartSidebar'))
import CartSidebar from 'src/components/cart/CartSidebar'
import RegionModal from 'src/components/region/RegionModal'

export const GLOBAL_SECTIONS_CONTENT_TYPE = 'globalSections'

Expand Down

0 comments on commit 7a787be

Please sign in to comment.