@faststore/core 3.0.153 → 3.0.154
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +82 -88
- package/.next/cache/.tsbuildinfo +1 -1
- package/.next/cache/config.json +3 -3
- package/.next/cache/eslint/.cache_1gneedd +1 -1
- package/.next/cache/webpack/client-production/0.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack +0 -0
- package/.next/cache/webpack/server-production/0.pack +0 -0
- package/.next/cache/webpack/server-production/index.pack +0 -0
- package/.next/next-minimal-server.js.nft.json +1 -1
- package/.next/next-server.js.nft.json +1 -1
- package/.next/prerender-manifest.js +1 -1
- package/.next/prerender-manifest.json +1 -1
- package/.next/react-loadable-manifest.json +214 -48
- package/.next/routes-manifest.json +1 -1
- package/.next/server/chunks/1844.js +1 -1
- package/.next/server/chunks/319.js +1 -0
- package/.next/server/chunks/3199.js +1 -0
- package/.next/server/chunks/4350.js +1 -0
- package/.next/server/chunks/5156.js +1 -0
- package/.next/server/chunks/5380.js +1 -0
- package/.next/server/chunks/5476.js +1 -0
- package/.next/server/chunks/5671.js +1 -1
- package/.next/server/chunks/5754.js +9 -0
- package/.next/server/chunks/6414.js +1 -0
- package/.next/server/chunks/8096.js +1 -1
- package/.next/server/chunks/8419.js +1 -0
- package/.next/server/chunks/8640.js +1 -0
- package/.next/server/chunks/8737.js +1 -0
- package/.next/server/chunks/9088.js +1 -1
- package/.next/server/chunks/9369.js +1 -0
- package/.next/server/chunks/9572.js +307 -0
- package/.next/server/chunks/983.js +1 -0
- package/.next/server/chunks/ScrollToTopButton.js +1 -0
- package/.next/server/chunks/UIBannerText.js +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/pages/404.js +1 -1
- package/.next/server/pages/404.js.nft.json +1 -1
- package/.next/server/pages/500.js +1 -1
- package/.next/server/pages/500.js.nft.json +1 -1
- package/.next/server/pages/[...slug].js +1 -1
- package/.next/server/pages/[...slug].js.nft.json +1 -1
- package/.next/server/pages/[slug]/p.js +1 -1
- package/.next/server/pages/[slug]/p.js.nft.json +1 -1
- package/.next/server/pages/_app.js.nft.json +1 -1
- package/.next/server/pages/_document.js.nft.json +1 -1
- package/.next/server/pages/_error.js.nft.json +1 -1
- package/.next/server/pages/account.js +1 -1
- package/.next/server/pages/account.js.nft.json +1 -1
- package/.next/server/pages/api/graphql.js.nft.json +1 -1
- package/.next/server/pages/api/health/live.js.nft.json +1 -1
- package/.next/server/pages/api/health/ready.js.nft.json +1 -1
- package/.next/server/pages/api/preview.js.nft.json +1 -1
- package/.next/server/pages/checkout.js +1 -1
- package/.next/server/pages/checkout.js.nft.json +1 -1
- package/.next/server/pages/en-US/404.html +1 -1
- package/.next/server/pages/en-US/404.json +1 -1
- package/.next/server/pages/en-US/500.html +1 -1
- package/.next/server/pages/en-US/500.json +1 -1
- package/.next/server/pages/en-US/account.html +1 -1
- package/.next/server/pages/en-US/account.json +1 -1
- package/.next/server/pages/en-US/checkout.html +1 -1
- package/.next/server/pages/en-US/checkout.json +1 -1
- package/.next/server/pages/en-US/login.html +1 -1
- package/.next/server/pages/en-US/login.json +1 -1
- package/.next/server/pages/en-US/s.html +1 -1
- package/.next/server/pages/en-US/s.json +1 -1
- package/.next/server/pages/en-US.html +2 -11
- package/.next/server/pages/en-US.json +1 -1
- package/.next/server/pages/index.js +1 -1
- package/.next/server/pages/index.js.nft.json +1 -1
- package/.next/server/pages/login.js +1 -1
- package/.next/server/pages/login.js.nft.json +1 -1
- package/.next/server/pages/s.js +1 -1
- package/.next/server/pages/s.js.nft.json +1 -1
- package/.next/server/webpack-runtime.js +1 -1
- package/.next/static/SfomoT7cCMNxtcr8yWFzF/_buildManifest.js +1 -0
- package/.next/static/chunks/1153.d7522522b6c917ed.js +1 -0
- package/.next/static/chunks/1550-f05e702b3204bd0a.js +1 -0
- package/.next/static/chunks/1552.a7758d4b2464351a.js +1 -0
- package/.next/static/chunks/1770.b0a7b096fe1d1bb2.js +1 -0
- package/.next/static/chunks/1774.85dc251aa39a517b.js +1 -0
- package/.next/static/chunks/2032.0826fda8cd80138d.js +1 -0
- package/.next/static/chunks/2388.908db499afc2082a.js +1 -0
- package/.next/static/chunks/2552.b245748eb0e40257.js +1 -0
- package/.next/static/chunks/3202.2bdeba847ce9ecd4.js +1 -0
- package/.next/static/chunks/3523.9c4d94172a1336ac.js +1 -0
- package/.next/static/chunks/3666.107f6d709e2d3b2c.js +1 -0
- package/.next/static/chunks/459-e4b75fb35a56e812.js +1 -0
- package/.next/static/chunks/5156.fe20405ee7a0d2d5.js +1 -0
- package/.next/static/chunks/5217.350e250227ef3657.js +1 -0
- package/.next/static/chunks/5380.955177408ea25915.js +1 -0
- package/.next/static/chunks/5484.50796e8843ec9dad.js +1 -0
- package/.next/static/chunks/5810.470a769e37e4b13b.js +1 -0
- package/.next/static/chunks/5997.8b2a914748263bb7.js +1 -0
- package/.next/static/chunks/6379-1578190b254c09a6.js +1 -0
- package/.next/static/chunks/6941-6223429b182b7109.js +33 -0
- package/.next/static/chunks/6999-7b2e114edc42cc1c.js +1 -0
- package/.next/static/chunks/7195.fb3e46b248b339d1.js +1 -0
- package/.next/static/chunks/8501.c65e0e689232daaf.js +1 -0
- package/.next/static/chunks/8857.0ff8f6604fb061a8.js +1 -0
- package/.next/static/chunks/9463.6f5675e44c925bfc.js +1 -0
- package/.next/static/chunks/983.3808cb829b3a4ec9.js +1 -0
- package/.next/static/chunks/BannerNewsletter.0b61ee5e562a55e0.js +1 -0
- package/.next/static/chunks/BannerText.a10d4f428fc5cd97.js +1 -0
- package/.next/static/chunks/ButtonSignIn.530066e6a0aaaa4b.js +1 -0
- package/.next/static/chunks/CartItem.64f56e23e94f577b.js +1 -0
- package/.next/static/chunks/CartSidebar.dfa8017080b88d46.js +1 -0
- package/.next/static/chunks/EmptyCart.335d05fe570a1b28.js +1 -0
- package/.next/static/chunks/Footer.c0816f0c74d7e24b.js +1 -0
- package/.next/static/chunks/Gift.a189921eb7c7a1a8.js +1 -0
- package/.next/static/chunks/Newsletter.7a07fe93f98e2922.js +1 -0
- package/.next/static/chunks/OrderSummary.2b7aae72c78d68ae.js +1 -0
- package/.next/static/chunks/ProductShelf.44b90c6f4e1c13d6.js +1 -0
- package/.next/static/chunks/ProductTiles.b3c7bd3a52226529.js +1 -0
- package/.next/static/chunks/RegionModal.23513fc5245a511f.js +1 -0
- package/.next/static/chunks/ScrollToTopButton.1fd39c18569afe69.js +1 -0
- package/.next/static/chunks/Toast.8635143b7896eb54.js +1 -0
- package/.next/static/chunks/UIBannerText.ac22c6843ac720b8.js +1 -0
- package/.next/static/chunks/UIButton.c6beeae8a8d0d6f3.js +1 -0
- package/.next/static/chunks/UIToast.a3b2b8fb137a7e55.js +1 -0
- package/.next/static/chunks/{framework-8e279965036b6169.js → framework-12a146e94cfcf7c4.js} +2 -2
- package/.next/static/chunks/main-209ac4974b020af1.js +1 -0
- package/.next/static/chunks/pages/404-358f6795222bf991.js +1 -0
- package/.next/static/chunks/pages/500-7adc48c3231ccee1.js +1 -0
- package/.next/static/chunks/pages/[...slug]-dcd9dbc989fa6d96.js +1 -0
- package/.next/static/chunks/pages/[slug]/p-eee2b539c749f442.js +1 -0
- package/.next/static/chunks/pages/_app-e419b2062065ccf0.js +1 -0
- package/.next/static/chunks/pages/_error-85cabf0d7a5ea2f2.js +1 -0
- package/.next/static/chunks/pages/account-9db0ef5c4174c7dd.js +1 -0
- package/.next/static/chunks/pages/checkout-abaa6374ae946641.js +1 -0
- package/.next/static/chunks/pages/index-8c1d9f19fd83e58b.js +1 -0
- package/.next/static/chunks/pages/login-8d2eb8db226d6363.js +1 -0
- package/.next/static/chunks/pages/s-67ecf818f7c63b16.js +1 -0
- package/.next/static/chunks/webpack-909c48392196dcdf.js +1 -0
- package/.next/static/css/083dc2a5b0de2439.css +1 -0
- package/.next/static/css/18e4be87b97035da.css +1 -0
- package/.next/static/css/210f14f5aba4cccd.css +1 -0
- package/.next/static/css/22fa0a502d499a62.css +1 -0
- package/.next/static/css/326d9de401ed8b48.css +1 -0
- package/.next/static/css/339c61e31dc962ed.css +1 -0
- package/.next/static/css/5273202f7c5e5ec1.css +1 -0
- package/.next/static/css/865e30903caadb79.css +1 -0
- package/.next/static/css/{e47f1a002bdcf76f.css → 936c65069d608087.css} +1 -1
- package/.next/static/css/93d239c461485bdf.css +1 -0
- package/.next/static/css/9718991cd57978e9.css +1 -0
- package/.next/static/css/b1806cbafd0c1f81.css +1 -0
- package/.next/static/css/bd9313ce4313a00a.css +1 -0
- package/.next/static/css/cba7600898edb684.css +1 -0
- package/.next/trace +97 -98
- package/.turbo/turbo-build.log +24 -24
- package/.turbo/turbo-lint.log +1 -1
- package/.turbo/turbo-test.log +5 -5
- package/package.json +2 -2
- package/src/components/cms/GlobalSections.tsx +0 -37
- package/src/components/cms/RenderSections.tsx +25 -17
- package/src/components/cms/home/Components.ts +7 -3
- package/src/components/cms/plp/Components.ts +59 -0
- package/src/components/cms/search/Components.ts +68 -0
- package/src/components/sections/ProductShelf/DefaultComponents.ts +17 -3
- package/src/components/templates/LandingPage/LandingPage.tsx +9 -1
- package/src/components/templates/ProductListingPage/ProductListing.tsx +25 -31
- package/src/components/templates/ProductListingPage/ProductListingPage.tsx +7 -1
- package/src/components/templates/SearchPage/SearchPage.tsx +13 -30
- package/src/components/templates/SearchPage/SearchWrapper.tsx +3 -0
- package/src/components/ui/ProductShelf/ProductShelf.tsx +7 -1
- package/src/pages/404.tsx +11 -5
- package/src/pages/500.tsx +11 -5
- package/src/pages/[...slug].tsx +31 -12
- package/src/pages/[slug]/p.tsx +10 -4
- package/src/pages/account.tsx +20 -8
- package/src/pages/checkout.tsx +21 -7
- package/src/pages/index.tsx +9 -23
- package/src/pages/login.tsx +14 -8
- package/src/pages/s.tsx +34 -35
- package/.next/server/chunks/1972.js +0 -1
- package/.next/server/chunks/350.js +0 -1
- package/.next/server/chunks/5070.js +0 -1
- package/.next/server/chunks/5771.js +0 -1
- package/.next/server/chunks/6153.js +0 -1
- package/.next/server/chunks/6604.js +0 -9
- package/.next/server/chunks/9646.js +0 -307
- package/.next/static/FXMFCIKLN-fFiSeONDqs3/_buildManifest.js +0 -1
- package/.next/static/chunks/135.e5b151734fa29f99.js +0 -1
- package/.next/static/chunks/153.70d524f369fef82b.js +0 -1
- package/.next/static/chunks/16.f4ecc14d79dc118b.js +0 -1
- package/.next/static/chunks/195.5f46b2d90f69ddfc.js +0 -1
- package/.next/static/chunks/202.2a784500752e6a56.js +0 -1
- package/.next/static/chunks/217.01bc0ad07edd6f1b.js +0 -1
- package/.next/static/chunks/343.d1c1e47ba6dfb4d9.js +0 -1
- package/.next/static/chunks/388.0b1a49b31ff12af9.js +0 -1
- package/.next/static/chunks/484.755bc4e4fb57ebb9.js +0 -1
- package/.next/static/chunks/523.fe333b7a44e82888.js +0 -1
- package/.next/static/chunks/568.50cb2fbb158c2a19.js +0 -1
- package/.next/static/chunks/617.0a2a7e39a7f3d4cc.js +0 -1
- package/.next/static/chunks/707-6818d9951a83f35f.js +0 -1
- package/.next/static/chunks/721-4610a9b937a1b5e9.js +0 -1
- package/.next/static/chunks/844.dd528a0bb7646dd6.js +0 -1
- package/.next/static/chunks/857.d2299cfe995af21d.js +0 -1
- package/.next/static/chunks/941-cee2b9776c3d2607.js +0 -33
- package/.next/static/chunks/973-d39dc88330d50aca.js +0 -1
- package/.next/static/chunks/ButtonSignIn.7c4c1355603b23bb.js +0 -1
- package/.next/static/chunks/CartItem.1b93d9b5f36a1120.js +0 -1
- package/.next/static/chunks/EmptyCart.a48b5bfb30ee09f0.js +0 -1
- package/.next/static/chunks/Gift.9a645d71d393dd98.js +0 -1
- package/.next/static/chunks/OrderSummary.637b2fff8f2574e1.js +0 -1
- package/.next/static/chunks/Toast.41ed93193046b5a5.js +0 -1
- package/.next/static/chunks/UIBannerText.4e11acdb3624808c.js +0 -1
- package/.next/static/chunks/UIToast.a17cb67e284572a7.js +0 -1
- package/.next/static/chunks/main-029f1328cfee9686.js +0 -1
- package/.next/static/chunks/pages/404-8428a5072b126db7.js +0 -1
- package/.next/static/chunks/pages/500-0f7529c8c8b90253.js +0 -1
- package/.next/static/chunks/pages/[...slug]-0db45ebf94081661.js +0 -1
- package/.next/static/chunks/pages/[slug]/p-1433a856605b917b.js +0 -1
- package/.next/static/chunks/pages/_app-cb1c3a94f987c5c8.js +0 -1
- package/.next/static/chunks/pages/_error-fbf331a03642b495.js +0 -1
- package/.next/static/chunks/pages/account-c0db07a5e90d1ee0.js +0 -1
- package/.next/static/chunks/pages/checkout-a751fc8e1dcb5285.js +0 -1
- package/.next/static/chunks/pages/index-a4ffe552b1b4a4a6.js +0 -1
- package/.next/static/chunks/pages/login-93bbc8089da5ce4a.js +0 -1
- package/.next/static/chunks/pages/s-7ad120ac3e73cbea.js +0 -1
- package/.next/static/chunks/webpack-ab89187244c136e9.js +0 -1
- package/.next/static/css/16d438c29387e6ad.css +0 -1
- package/.next/static/css/1ad39dcb52269ada.css +0 -1
- package/.next/static/css/9b6bba2472d272ec.css +0 -1
- package/.next/static/css/e8d8f9a77767c4b3.css +0 -1
- /package/.next/static/{FXMFCIKLN-fFiSeONDqs3 → SfomoT7cCMNxtcr8yWFzF}/_ssgManifest.js +0 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -38,40 +38,40 @@ https://nextjs.org/telemetry
|
|
|
38
38
|
Collecting page data ...
|
|
39
39
|
Generating static pages (0/7) ...
|
|
40
40
|
|
|
41
41
|
Generating static pages (1/7)
|
|
42
|
-
Warning: Dynamic Content not found for the page: home. Refer to the Dynamic Content documentation at https://developers.vtex.com/docs/guides/faststore/dynamic-content-overview for mapping the page and the corresponding data-fetching function.
|
|
43
42
|
|
|
44
43
|
Generating static pages (3/7)
|
|
44
|
+
Warning: Dynamic Content not found for the page: home. Refer to the Dynamic Content documentation at https://developers.vtex.com/docs/guides/faststore/dynamic-content-overview for mapping the page and the corresponding data-fetching function.
|
|
45
45
|
|
|
46
46
|
Generating static pages (5/7)
|
|
47
47
|
|
|
48
48
|
✓ Generating static pages (7/7)
|
|
49
49
|
Finalizing page optimization ...
|
|
50
50
|
Collecting build traces ...
|
|
51
51
|
|
|
52
52
|
Route (pages) Size First Load JS
|
|
53
|
-
┌ ● /
|
|
54
|
-
├ └ css/
|
|
55
|
-
├ /_app 0 B
|
|
56
|
-
├ ● /[...slug] 2
|
|
57
|
-
├
|
|
58
|
-
├
|
|
59
|
-
├ └ css/
|
|
60
|
-
├ ○ /404 1.
|
|
61
|
-
├ ● /500 1.
|
|
62
|
-
├ ● /account
|
|
63
|
-
├ λ /api/graphql 0 B
|
|
64
|
-
├ λ /api/health/live 0 B
|
|
65
|
-
├ λ /api/health/ready 0 B
|
|
66
|
-
├ λ /api/preview 0 B
|
|
67
|
-
├ ● /checkout
|
|
68
|
-
├ ● /login 1.
|
|
69
|
-
└ ● /s 2.
|
|
70
|
-
+ First Load JS shared by all 94.
|
|
71
|
-
├ chunks/framework-
|
|
72
|
-
├ chunks/main-
|
|
73
|
-
├ chunks/pages/_app-
|
|
74
|
-
├ chunks/webpack-
|
|
53
|
+
┌ ● / 3.2 kB 121 kB
|
|
54
|
+
├ └ css/b1806cbafd0c1f81.css 3.06 kB
|
|
55
|
+
├ /_app 0 B 91.7 kB
|
|
56
|
+
├ ● /[...slug] 2 kB 137 kB
|
|
57
|
+
├ ● /[slug]/p 30.2 kB 148 kB
|
|
58
|
+
├ ├ css/bd9313ce4313a00a.css 11.1 kB
|
|
59
|
+
├ └ css/9718991cd57978e9.css 14.8 kB
|
|
60
|
+
├ ○ /404 1.46 kB 120 kB
|
|
61
|
+
├ ● /500 1.46 kB 120 kB
|
|
62
|
+
├ ● /account 712 B 119 kB
|
|
63
|
+
├ λ /api/graphql 0 B 91.7 kB
|
|
64
|
+
├ λ /api/health/live 0 B 91.7 kB
|
|
65
|
+
├ λ /api/health/ready 0 B 91.7 kB
|
|
66
|
+
├ λ /api/preview 0 B 91.7 kB
|
|
67
|
+
├ ● /checkout 694 B 119 kB
|
|
68
|
+
├ ● /login 1.57 kB 120 kB
|
|
69
|
+
└ ● /s 2.44 kB 137 kB
|
|
70
|
+
+ First Load JS shared by all 94.7 kB
|
|
71
|
+
├ chunks/framework-12a146e94cfcf7c4.js 45.4 kB
|
|
72
|
+
├ chunks/main-209ac4974b020af1.js 33.1 kB
|
|
73
|
+
├ chunks/pages/_app-e419b2062065ccf0.js 9.87 kB
|
|
74
|
+
├ chunks/webpack-909c48392196dcdf.js 3.36 kB
|
|
75
75
|
└ css/ee0556daedda6306.css 3.07 kB
|
|
76
76
|
|
|
77
77
|
λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps)
|
|
78
78
|
○ (Static) automatically rendered as static HTML (uses no initial props)
|
|
79
79
|
● (SSG) automatically generated as static HTML + JSON (uses getStaticProps)
|
|
80
80
|
|
|
81
|
-
Done in
|
|
81
|
+
Done in 72.68s.
|
package/.turbo/turbo-lint.log
CHANGED
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
yarn run v1.22.22
|
|
2
2
|
$ jest
|
|
3
|
-
PASS test/
|
|
4
|
-
PASS test/
|
|
5
|
-
PASS test/server/index.test.ts (38.
|
|
3
|
+
PASS test/server/cms/index.test.ts (34.73 s)
|
|
4
|
+
PASS test/utils/multipleTemplates.test.ts (35.126 s)
|
|
5
|
+
PASS test/server/index.test.ts (38.729 s)
|
|
6
6
|
|
|
7
7
|
Test Suites: 3 passed, 3 total
|
|
8
8
|
Tests: 19 passed, 19 total
|
|
9
9
|
Snapshots: 0 total
|
|
10
|
-
Time: 39.
|
|
10
|
+
Time: 39.901 s
|
|
11
11
|
Ran all test suites.
|
|
12
|
-
Done in 41.
|
|
12
|
+
Done in 41.34s.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faststore/core",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.154",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": "vtex/faststore",
|
|
6
6
|
"browserslist": "supports es6-module and not dead",
|
|
@@ -128,5 +128,5 @@
|
|
|
128
128
|
"node": "18.19.0",
|
|
129
129
|
"yarn": "1.19.1"
|
|
130
130
|
},
|
|
131
|
-
"gitHead": "
|
|
131
|
+
"gitHead": "1a368785a4a5b20300f346bfad13435a2395b6f8"
|
|
132
132
|
}
|
|
@@ -1,50 +1,13 @@
|
|
|
1
1
|
import { Locator, Section } from '@vtex/client-cms'
|
|
2
2
|
import storeConfig from 'discovery.config'
|
|
3
|
-
import type { ComponentType } from 'react'
|
|
4
|
-
import { PropsWithChildren } from 'react'
|
|
5
|
-
import CUSTOM_COMPONENTS from 'src/customizations/src/components'
|
|
6
3
|
import { PageContentType, getPage } from 'src/server/cms'
|
|
7
4
|
|
|
8
|
-
import RenderSections from './RenderSections'
|
|
9
|
-
|
|
10
|
-
import { OverriddenDefaultAlert as Alert } from 'src/components/sections/Alert/OverriddenDefaultAlert'
|
|
11
|
-
import Footer from 'src/components/sections/Footer'
|
|
12
|
-
import { OverriddenDefaultNavbar as Navbar } from 'src/components/sections/Navbar/OverriddenDefaultNavbar'
|
|
13
|
-
import { OverriddenDefaultRegionBar as RegionBar } from 'src/components/sections/RegionBar/OverriddenDefaultRegionBar'
|
|
14
|
-
|
|
15
|
-
import CartSidebar from 'src/components/cart/CartSidebar'
|
|
16
|
-
import RegionModal from 'src/components/region/RegionModal'
|
|
17
|
-
|
|
18
5
|
export const GLOBAL_SECTIONS_CONTENT_TYPE = 'globalSections'
|
|
19
6
|
|
|
20
7
|
export type GlobalSectionsData = {
|
|
21
8
|
sections: Section[]
|
|
22
9
|
}
|
|
23
10
|
|
|
24
|
-
/* A list of components that can be used in the CMS. */
|
|
25
|
-
const COMPONENTS: Record<string, ComponentType<any>> = {
|
|
26
|
-
Alert,
|
|
27
|
-
Navbar,
|
|
28
|
-
RegionBar,
|
|
29
|
-
RegionModal,
|
|
30
|
-
CartSidebar,
|
|
31
|
-
Footer,
|
|
32
|
-
...CUSTOM_COMPONENTS,
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function GlobalSections({
|
|
36
|
-
children,
|
|
37
|
-
...otherProps
|
|
38
|
-
}: PropsWithChildren<GlobalSectionsData>) {
|
|
39
|
-
return (
|
|
40
|
-
<RenderSections components={COMPONENTS} {...otherProps}>
|
|
41
|
-
<main>{children}</main>
|
|
42
|
-
</RenderSections>
|
|
43
|
-
)
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export default GlobalSections
|
|
47
|
-
|
|
48
11
|
export const getGlobalSectionsData = async (
|
|
49
12
|
previewData: Locator
|
|
50
13
|
): Promise<GlobalSectionsData> => {
|
|
@@ -10,12 +10,14 @@ import { Section } from '@vtex/client-cms'
|
|
|
10
10
|
import dynamic from 'next/dynamic'
|
|
11
11
|
import SectionBoundary from './SectionBoundary'
|
|
12
12
|
import ViewportObserver from './ViewportObserver'
|
|
13
|
+
import COMPONENTS from './global/Components'
|
|
13
14
|
|
|
14
15
|
import { useUI } from '@faststore/ui'
|
|
15
16
|
|
|
16
17
|
interface Props {
|
|
17
|
-
components
|
|
18
|
-
|
|
18
|
+
components?: Record<string, ComponentType<any>>
|
|
19
|
+
globalSections?: Array<{ name: string; data: any }>
|
|
20
|
+
sections?: Array<{ name: string; data: any }>
|
|
19
21
|
}
|
|
20
22
|
|
|
21
23
|
const SECTIONS_OUT_OF_VIEWPORT = ['CartSidebar', 'RegionModal']
|
|
@@ -45,7 +47,6 @@ const useDividedSections = (sections: Section[]) => {
|
|
|
45
47
|
* 2. Checking the UI context for Sections that are not in the viewport, such as the CartSidebar and RegionModal.
|
|
46
48
|
*
|
|
47
49
|
* @param sectionName
|
|
48
|
-
* @returns
|
|
49
50
|
*/
|
|
50
51
|
export const LazyLoadingSection = ({
|
|
51
52
|
sectionName,
|
|
@@ -60,11 +61,8 @@ export const LazyLoadingSection = ({
|
|
|
60
61
|
const shouldLoad =
|
|
61
62
|
(sectionName === 'CartSidebar' && displayCart) ||
|
|
62
63
|
(sectionName === 'RegionModal' && displayModal)
|
|
63
|
-
if (!shouldLoad) {
|
|
64
|
-
return null
|
|
65
|
-
}
|
|
66
64
|
|
|
67
|
-
return children
|
|
65
|
+
return shouldLoad ? <>{children}</> : null
|
|
68
66
|
}
|
|
69
67
|
return (
|
|
70
68
|
<ViewportObserver sectionName={sectionName}>{children}</ViewportObserver>
|
|
@@ -74,7 +72,7 @@ export const LazyLoadingSection = ({
|
|
|
74
72
|
const RenderSectionsBase = ({ sections = [], components }: Props) => {
|
|
75
73
|
return (
|
|
76
74
|
<>
|
|
77
|
-
{sections.map(({ name, data }, index) => {
|
|
75
|
+
{sections.map(({ name, data = {} }, index) => {
|
|
78
76
|
const Component = components[name]
|
|
79
77
|
|
|
80
78
|
if (!Component) {
|
|
@@ -88,7 +86,9 @@ const RenderSectionsBase = ({ sections = [], components }: Props) => {
|
|
|
88
86
|
|
|
89
87
|
return (
|
|
90
88
|
<SectionBoundary key={`cms-section-${name}-${index}`} name={name}>
|
|
91
|
-
<
|
|
89
|
+
<LazyLoadingSection sectionName={name}>
|
|
90
|
+
<Component {...data} />
|
|
91
|
+
</LazyLoadingSection>
|
|
92
92
|
</SectionBoundary>
|
|
93
93
|
)
|
|
94
94
|
})}
|
|
@@ -98,21 +98,29 @@ const RenderSectionsBase = ({ sections = [], components }: Props) => {
|
|
|
98
98
|
|
|
99
99
|
function RenderSections({
|
|
100
100
|
children,
|
|
101
|
+
globalSections,
|
|
101
102
|
sections,
|
|
102
|
-
|
|
103
|
+
components = COMPONENTS,
|
|
103
104
|
}: PropsWithChildren<Props>) {
|
|
104
|
-
const {
|
|
105
|
-
|
|
105
|
+
const { firstSections, lastSections } = useDividedSections(
|
|
106
|
+
globalSections ?? sections
|
|
107
|
+
)
|
|
106
108
|
|
|
107
109
|
return (
|
|
108
110
|
<>
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
111
|
+
{firstSections && (
|
|
112
|
+
<RenderSectionsBase sections={firstSections} components={components} />
|
|
113
|
+
)}
|
|
114
|
+
{sections && sections.length > 0 && (
|
|
115
|
+
<RenderSectionsBase sections={sections} components={components} />
|
|
116
|
+
)}
|
|
112
117
|
{children}
|
|
118
|
+
<LazyLoadingSection sectionName="Toast">
|
|
119
|
+
<Toast />
|
|
120
|
+
</LazyLoadingSection>
|
|
113
121
|
|
|
114
|
-
{
|
|
115
|
-
<RenderSectionsBase sections={lastSections} {
|
|
122
|
+
{lastSections && (
|
|
123
|
+
<RenderSectionsBase sections={lastSections} components={components} />
|
|
116
124
|
)}
|
|
117
125
|
</>
|
|
118
126
|
)
|
|
@@ -11,21 +11,21 @@ const BannerText = dynamic(
|
|
|
11
11
|
() =>
|
|
12
12
|
import(
|
|
13
13
|
/* webpackChunkName: "BannerText" */ 'src/components/sections/BannerText/OverriddenDefaultBannerText'
|
|
14
|
-
).then((mod) =>
|
|
14
|
+
).then((mod) => mod.OverriddenDefaultBannerText),
|
|
15
15
|
{ ssr: false }
|
|
16
16
|
)
|
|
17
17
|
const Newsletter = dynamic(
|
|
18
18
|
() =>
|
|
19
19
|
import(
|
|
20
20
|
/* webpackChunkName: "Newsletter" */ 'src/components/sections/Newsletter/OverriddenDefaultNewsletter'
|
|
21
|
-
).then((mod) =>
|
|
21
|
+
).then((mod) => mod.OverriddenDefaultNewsletter),
|
|
22
22
|
{ ssr: false }
|
|
23
23
|
)
|
|
24
24
|
const ProductShelf = dynamic(
|
|
25
25
|
() =>
|
|
26
26
|
import(
|
|
27
27
|
/* webpackChunkName: "ProductShelf" */ 'src/components/sections/ProductShelf/OverriddenDefaultProductShelf'
|
|
28
|
-
).then((mod) =>
|
|
28
|
+
).then((mod) => mod.OverriddenDefaultProductShelf),
|
|
29
29
|
{ ssr: false }
|
|
30
30
|
)
|
|
31
31
|
const ProductTiles = dynamic(
|
|
@@ -36,6 +36,10 @@ const ProductTiles = dynamic(
|
|
|
36
36
|
{ ssr: false }
|
|
37
37
|
)
|
|
38
38
|
|
|
39
|
+
/**
|
|
40
|
+
* Sections: Components imported from each store's custom components and '../components/sections' only.
|
|
41
|
+
* Do not import or render components from any other folder in here.
|
|
42
|
+
*/
|
|
39
43
|
const COMPONENTS: Record<string, ComponentType<any>> = {
|
|
40
44
|
...GLOBAL_COMPONENTS,
|
|
41
45
|
Hero,
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import dynamic from 'next/dynamic'
|
|
2
|
+
import { ComponentType } from 'react'
|
|
3
|
+
|
|
4
|
+
import { OverriddenDefaultBreadcrumb as Breadcrumb } from 'src/components/sections/Breadcrumb/OverriddenDefaultBreadcrumb'
|
|
5
|
+
import { OverriddenDefaultHero as Hero } from 'src/components/sections/Hero/OverriddenDefaultHero'
|
|
6
|
+
import { OverriddenDefaultProductGallery as ProductGallery } from 'src/components/sections/ProductGallery/OverriddenDefaultProductGallery'
|
|
7
|
+
import CUSTOM_COMPONENTS from 'src/customizations/src/components'
|
|
8
|
+
import { default as GLOBAL_COMPONENTS } from '../global/Components'
|
|
9
|
+
|
|
10
|
+
const BannerText = dynamic(
|
|
11
|
+
() =>
|
|
12
|
+
import(
|
|
13
|
+
/* webpackChunkName: "BannerText" */
|
|
14
|
+
'src/components/sections/BannerText/OverriddenDefaultBannerText'
|
|
15
|
+
).then((mod) => mod.OverriddenDefaultBannerText),
|
|
16
|
+
{ ssr: false }
|
|
17
|
+
)
|
|
18
|
+
const Newsletter = dynamic(
|
|
19
|
+
() =>
|
|
20
|
+
import(
|
|
21
|
+
/* webpackChunkName: "Newsletter" */
|
|
22
|
+
'src/components/sections/Newsletter/OverriddenDefaultNewsletter'
|
|
23
|
+
).then((mod) => mod.OverriddenDefaultNewsletter),
|
|
24
|
+
{ ssr: false }
|
|
25
|
+
)
|
|
26
|
+
const ProductShelf = dynamic(
|
|
27
|
+
() =>
|
|
28
|
+
import(
|
|
29
|
+
/* webpackChunkName: "ProductShelf" */
|
|
30
|
+
'src/components/sections/ProductShelf/OverriddenDefaultProductShelf'
|
|
31
|
+
).then((mod) => mod.OverriddenDefaultProductShelf),
|
|
32
|
+
{ ssr: false }
|
|
33
|
+
)
|
|
34
|
+
const ProductTiles = dynamic(
|
|
35
|
+
() =>
|
|
36
|
+
import(
|
|
37
|
+
/* webpackChunkName: "ProductTiles" */
|
|
38
|
+
'src/components/sections/ProductTiles'
|
|
39
|
+
),
|
|
40
|
+
{ ssr: false }
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Sections: Components imported from each store's custom components and '../components/sections' only.
|
|
45
|
+
* Do not import or render components from any other folder in here.
|
|
46
|
+
*/
|
|
47
|
+
const COMPONENTS: Record<string, ComponentType<any>> = {
|
|
48
|
+
...GLOBAL_COMPONENTS,
|
|
49
|
+
Breadcrumb,
|
|
50
|
+
Hero,
|
|
51
|
+
ProductGallery,
|
|
52
|
+
BannerText,
|
|
53
|
+
Newsletter,
|
|
54
|
+
ProductShelf,
|
|
55
|
+
ProductTiles,
|
|
56
|
+
...CUSTOM_COMPONENTS,
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export default COMPONENTS
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import dynamic from 'next/dynamic'
|
|
2
|
+
import { ComponentType } from 'react'
|
|
3
|
+
|
|
4
|
+
import { OverriddenDefaultBreadcrumb as Breadcrumb } from 'src/components/sections/Breadcrumb/OverriddenDefaultBreadcrumb'
|
|
5
|
+
import { OverriddenDefaultHero as Hero } from 'src/components/sections/Hero/OverriddenDefaultHero'
|
|
6
|
+
import { OverriddenDefaultProductGallery as ProductGallery } from 'src/components/sections/ProductGallery/OverriddenDefaultProductGallery'
|
|
7
|
+
import CUSTOM_COMPONENTS from 'src/customizations/src/components'
|
|
8
|
+
import { default as GLOBAL_COMPONENTS } from '../global/Components'
|
|
9
|
+
|
|
10
|
+
const BannerText = dynamic(
|
|
11
|
+
() =>
|
|
12
|
+
import(
|
|
13
|
+
/* webpackChunkName: "BannerText" */
|
|
14
|
+
'src/components/sections/BannerText/OverriddenDefaultBannerText'
|
|
15
|
+
).then((mod) => mod.OverriddenDefaultBannerText),
|
|
16
|
+
{ ssr: false }
|
|
17
|
+
)
|
|
18
|
+
const BannerNewsletter = dynamic(
|
|
19
|
+
() =>
|
|
20
|
+
import(
|
|
21
|
+
/* webpackChunkName: "BannerNewsletter" */
|
|
22
|
+
'src/components/sections/BannerNewsletter/BannerNewsletter'
|
|
23
|
+
),
|
|
24
|
+
{ ssr: false }
|
|
25
|
+
)
|
|
26
|
+
const Newsletter = dynamic(
|
|
27
|
+
() =>
|
|
28
|
+
import(
|
|
29
|
+
/* webpackChunkName: "Newsletter" */
|
|
30
|
+
'src/components/sections/Newsletter/OverriddenDefaultNewsletter'
|
|
31
|
+
).then((mod) => mod.OverriddenDefaultNewsletter),
|
|
32
|
+
{ ssr: false }
|
|
33
|
+
)
|
|
34
|
+
const ProductShelf = dynamic(
|
|
35
|
+
() =>
|
|
36
|
+
import(
|
|
37
|
+
/* webpackChunkName: "ProductShelf" */
|
|
38
|
+
'src/components/sections/ProductShelf/OverriddenDefaultProductShelf'
|
|
39
|
+
).then((mod) => mod.OverriddenDefaultProductShelf),
|
|
40
|
+
{ ssr: false }
|
|
41
|
+
)
|
|
42
|
+
const ProductTiles = dynamic(
|
|
43
|
+
() =>
|
|
44
|
+
import(
|
|
45
|
+
/* webpackChunkName: "ProductTiles" */
|
|
46
|
+
'src/components/sections/ProductTiles'
|
|
47
|
+
),
|
|
48
|
+
{ ssr: false }
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Sections: Components imported from each store's custom components and '../components/sections' only.
|
|
53
|
+
* Do not import or render components from any other folder in here.
|
|
54
|
+
*/
|
|
55
|
+
const COMPONENTS: Record<string, ComponentType<any>> = {
|
|
56
|
+
...GLOBAL_COMPONENTS,
|
|
57
|
+
Breadcrumb,
|
|
58
|
+
Hero,
|
|
59
|
+
ProductGallery,
|
|
60
|
+
BannerText,
|
|
61
|
+
BannerNewsletter,
|
|
62
|
+
Newsletter,
|
|
63
|
+
ProductShelf,
|
|
64
|
+
ProductTiles,
|
|
65
|
+
...CUSTOM_COMPONENTS,
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export default COMPONENTS
|
|
@@ -1,6 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import dynamic from 'next/dynamic'
|
|
2
|
+
const UIProductShelf = dynamic(() =>
|
|
3
|
+
/* webpackChunkName: "UIProductShelf" */
|
|
4
|
+
import('@faststore/ui').then((mod) => mod.ProductShelf)
|
|
5
|
+
)
|
|
6
|
+
|
|
7
|
+
const Carousel = dynamic(
|
|
8
|
+
() =>
|
|
9
|
+
/* webpackChunkName: "Carousel" */
|
|
10
|
+
import('src/components/ui/Carousel')
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
const ProductCard = dynamic(
|
|
14
|
+
() =>
|
|
15
|
+
/* webpackChunkName: "ProductCard" */
|
|
16
|
+
import('src/components/product/ProductCard')
|
|
17
|
+
)
|
|
4
18
|
|
|
5
19
|
export const ProductShelfDefaultComponents = {
|
|
6
20
|
ProductShelf: UIProductShelf,
|
|
@@ -12,6 +12,7 @@ import { OverriddenDefaultNewsletter as Newsletter } from 'src/components/sectio
|
|
|
12
12
|
import { OverriddenDefaultProductShelf as ProductShelf } from 'src/components/sections/ProductShelf/OverriddenDefaultProductShelf'
|
|
13
13
|
import ProductTiles from 'src/components/sections/ProductTiles'
|
|
14
14
|
import CUSTOM_COMPONENTS from 'src/customizations/src/components'
|
|
15
|
+
import { default as GLOBAL_COMPONENTS } from 'src/components/cms/global/Components'
|
|
15
16
|
import MissingContentError from 'src/sdk/error/MissingContentError/MissingContentError'
|
|
16
17
|
import PageProvider from 'src/sdk/overrides/PageProvider'
|
|
17
18
|
import type { PageContentType } from 'src/server/cms'
|
|
@@ -21,6 +22,7 @@ import storeConfig from 'discovery.config'
|
|
|
21
22
|
|
|
22
23
|
/* A list of components that can be used in the CMS. */
|
|
23
24
|
const COMPONENTS: Record<string, ComponentType<any>> = {
|
|
25
|
+
...GLOBAL_COMPONENTS,
|
|
24
26
|
Hero,
|
|
25
27
|
BannerText,
|
|
26
28
|
BannerNewsletter,
|
|
@@ -36,12 +38,14 @@ export type LandingPageProps = {
|
|
|
36
38
|
page: PageContentType
|
|
37
39
|
slug?: string
|
|
38
40
|
serverData?: unknown
|
|
41
|
+
globalSections?: Array<{ name: string; data: any }>
|
|
39
42
|
}
|
|
40
43
|
|
|
41
44
|
export default function LandingPage({
|
|
42
45
|
page: { sections, settings },
|
|
43
46
|
slug,
|
|
44
47
|
serverData,
|
|
48
|
+
globalSections,
|
|
45
49
|
}: LandingPageProps) {
|
|
46
50
|
const context = {
|
|
47
51
|
data: serverData,
|
|
@@ -87,7 +91,11 @@ export default function LandingPage({
|
|
|
87
91
|
(not the HTML tag) before rendering it here.
|
|
88
92
|
*/}
|
|
89
93
|
<PageProvider context={context}>
|
|
90
|
-
<RenderSections
|
|
94
|
+
<RenderSections
|
|
95
|
+
sections={sections}
|
|
96
|
+
globalSections={globalSections}
|
|
97
|
+
components={COMPONENTS}
|
|
98
|
+
/>
|
|
91
99
|
</PageProvider>
|
|
92
100
|
</>
|
|
93
101
|
)
|
|
@@ -1,20 +1,14 @@
|
|
|
1
1
|
import { useSearch } from '@faststore/sdk'
|
|
2
2
|
import type { ServerCollectionPageQueryQuery } from '@generated/graphql'
|
|
3
3
|
import deepmerge from 'deepmerge'
|
|
4
|
-
import BannerNewsletter from 'src/components/sections/BannerNewsletter/BannerNewsletter'
|
|
5
|
-
import { OverriddenDefaultBannerText as BannerText } from 'src/components/sections/BannerText/OverriddenDefaultBannerText'
|
|
6
|
-
import { OverriddenDefaultBreadcrumb as Breadcrumb } from 'src/components/sections/Breadcrumb/OverriddenDefaultBreadcrumb'
|
|
7
|
-
import { OverriddenDefaultHero as Hero } from 'src/components/sections/Hero/OverriddenDefaultHero'
|
|
8
|
-
import { OverriddenDefaultNewsletter as Newsletter } from 'src/components/sections/Newsletter/OverriddenDefaultNewsletter'
|
|
9
|
-
import { OverriddenDefaultProductGallery as ProductGallery } from 'src/components/sections/ProductGallery/OverriddenDefaultProductGallery'
|
|
10
|
-
import { OverriddenDefaultProductShelf as ProductShelf } from 'src/components/sections/ProductShelf/OverriddenDefaultProductShelf'
|
|
11
|
-
import ProductTiles from 'src/components/sections/ProductTiles'
|
|
12
|
-
import ScrollToTopButton from 'src/components/sections/ScrollToTopButton'
|
|
13
4
|
import { ITEMS_PER_PAGE } from 'src/constants'
|
|
14
5
|
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
|
|
6
|
+
import dynamic from 'next/dynamic'
|
|
7
|
+
import COMPONENTS from 'src/components/cms/plp/Components'
|
|
8
|
+
|
|
9
|
+
import RenderSections, {
|
|
10
|
+
LazyLoadingSection,
|
|
11
|
+
} from 'src/components/cms/RenderSections'
|
|
18
12
|
import { PLPContentType } from 'src/server/cms/plp'
|
|
19
13
|
|
|
20
14
|
import PageProvider, { PLPContext } from 'src/sdk/overrides/PageProvider'
|
|
@@ -24,25 +18,18 @@ import {
|
|
|
24
18
|
} from 'src/sdk/product/usePageProductsQuery'
|
|
25
19
|
import { useProductGalleryQuery } from 'src/sdk/product/useProductGalleryQuery'
|
|
26
20
|
|
|
21
|
+
const ScrollToTopButton = dynamic(
|
|
22
|
+
() =>
|
|
23
|
+
import(
|
|
24
|
+
/* webpackChunkName: "ScrollToTopButton" */
|
|
25
|
+
'src/components/sections/ScrollToTopButton'
|
|
26
|
+
)
|
|
27
|
+
)
|
|
28
|
+
|
|
27
29
|
export type ProductListingPageProps = {
|
|
28
30
|
data: ServerCollectionPageQueryQuery
|
|
29
31
|
page: PLPContentType
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Sections: Components imported from each store's custom components and '../components/sections' only.
|
|
34
|
-
* Do not import or render components from any other folder in here.
|
|
35
|
-
*/
|
|
36
|
-
const COMPONENTS: Record<string, ComponentType<any>> = {
|
|
37
|
-
Breadcrumb,
|
|
38
|
-
BannerText,
|
|
39
|
-
BannerNewsletter,
|
|
40
|
-
Hero,
|
|
41
|
-
Newsletter,
|
|
42
|
-
ProductGallery,
|
|
43
|
-
ProductShelf,
|
|
44
|
-
ProductTiles,
|
|
45
|
-
...CUSTOM_COMPONENTS,
|
|
32
|
+
globalSections?: Array<{ name: string; data: any }>
|
|
46
33
|
}
|
|
47
34
|
|
|
48
35
|
// Array merging strategy from deepmerge that makes client arrays overwrite server array
|
|
@@ -52,6 +39,7 @@ const overwriteMerge = (_: any[], sourceArray: any[]) => sourceArray
|
|
|
52
39
|
export default function ProductListing({
|
|
53
40
|
page: { sections, settings },
|
|
54
41
|
data: server,
|
|
42
|
+
globalSections,
|
|
55
43
|
}: ProductListingPageProps) {
|
|
56
44
|
const {
|
|
57
45
|
state: { sort, term, selectedFacets },
|
|
@@ -93,11 +81,17 @@ export default function ProductListing({
|
|
|
93
81
|
*/}
|
|
94
82
|
<PageProvider context={context}>
|
|
95
83
|
<UseGalleryPageContext.Provider value={useGalleryPage}>
|
|
96
|
-
<RenderSections
|
|
84
|
+
<RenderSections
|
|
85
|
+
sections={sections}
|
|
86
|
+
globalSections={globalSections}
|
|
87
|
+
components={COMPONENTS}
|
|
88
|
+
>
|
|
89
|
+
<LazyLoadingSection sectionName="ScrollToTopButton">
|
|
90
|
+
<ScrollToTopButton />
|
|
91
|
+
</LazyLoadingSection>
|
|
92
|
+
</RenderSections>
|
|
97
93
|
</UseGalleryPageContext.Provider>
|
|
98
94
|
</PageProvider>
|
|
99
|
-
|
|
100
|
-
<ScrollToTopButton />
|
|
101
95
|
</>
|
|
102
96
|
)
|
|
103
97
|
}
|
|
@@ -20,6 +20,7 @@ import ProductListing from './ProductListing'
|
|
|
20
20
|
export type ProductListingPageProps = {
|
|
21
21
|
data: ServerCollectionPageQueryQuery
|
|
22
22
|
page: PLPContentType
|
|
23
|
+
globalSections?: Array<{ name: string; data: any }>
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
type UseSearchParams = {
|
|
@@ -56,6 +57,7 @@ const useSearchParams = ({
|
|
|
56
57
|
export default function ProductListingPage({
|
|
57
58
|
page: plpContentType,
|
|
58
59
|
data: server,
|
|
60
|
+
globalSections,
|
|
59
61
|
}: ProductListingPageProps) {
|
|
60
62
|
const { settings } = plpContentType
|
|
61
63
|
const collection = server.collection
|
|
@@ -94,7 +96,11 @@ export default function ProductListingPage({
|
|
|
94
96
|
itemListElements={collection?.breadcrumbList.itemListElement ?? []}
|
|
95
97
|
/>
|
|
96
98
|
|
|
97
|
-
<ProductListing
|
|
99
|
+
<ProductListing
|
|
100
|
+
globalSections={globalSections}
|
|
101
|
+
page={plpContentType}
|
|
102
|
+
data={server}
|
|
103
|
+
/>
|
|
98
104
|
</SearchProvider>
|
|
99
105
|
)
|
|
100
106
|
}
|