@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
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type { ClientProductGalleryQueryQuery as ClientProductGalleryQuery } from '@generated/graphql'
|
|
3
2
|
import RenderSections from 'src/components/cms/RenderSections'
|
|
4
|
-
import
|
|
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 CUSTOM_COMPONENTS from 'src/customizations/src/components'
|
|
3
|
+
import COMPONENTS from 'src/components/cms/search/Components'
|
|
13
4
|
import { SearchPageContextType } from 'src/pages/s'
|
|
14
5
|
import PageProvider, { SearchPageContext } from 'src/sdk/overrides/PageProvider'
|
|
15
6
|
import {
|
|
@@ -17,30 +8,18 @@ import {
|
|
|
17
8
|
UseGalleryPageContext,
|
|
18
9
|
} from 'src/sdk/product/usePageProductsQuery'
|
|
19
10
|
import { SearchContentType } from 'src/server/cms'
|
|
20
|
-
import type { ClientProductGalleryQueryQuery as ClientProductGalleryQuery } from '@generated/graphql'
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Sections: Components imported from each store's custom components and '../components/sections' only.
|
|
24
|
-
* Do not import or render components from any other folder in here.
|
|
25
|
-
*/
|
|
26
|
-
const COMPONENTS: Record<string, ComponentType<any>> = {
|
|
27
|
-
Breadcrumb,
|
|
28
|
-
BannerText,
|
|
29
|
-
BannerNewsletter,
|
|
30
|
-
Newsletter,
|
|
31
|
-
Hero,
|
|
32
|
-
ProductGallery,
|
|
33
|
-
ProductShelf,
|
|
34
|
-
ProductTiles,
|
|
35
|
-
...CUSTOM_COMPONENTS,
|
|
36
|
-
}
|
|
37
11
|
|
|
38
12
|
export type SearchPageProps = {
|
|
39
13
|
data: SearchPageContextType & ClientProductGalleryQuery
|
|
40
14
|
page: SearchContentType
|
|
15
|
+
globalSections?: Array<{ name: string; data: any }>
|
|
41
16
|
}
|
|
42
17
|
|
|
43
|
-
function SearchPage({
|
|
18
|
+
function SearchPage({
|
|
19
|
+
page: { sections },
|
|
20
|
+
data: serverData,
|
|
21
|
+
globalSections,
|
|
22
|
+
}: SearchPageProps) {
|
|
44
23
|
const { pages, useGalleryPage } = useCreateUseGalleryPage()
|
|
45
24
|
|
|
46
25
|
const context = {
|
|
@@ -65,7 +44,11 @@ function SearchPage({ page: { sections }, data: serverData }: SearchPageProps) {
|
|
|
65
44
|
*/}
|
|
66
45
|
<PageProvider context={context}>
|
|
67
46
|
<UseGalleryPageContext.Provider value={useGalleryPage}>
|
|
68
|
-
<RenderSections
|
|
47
|
+
<RenderSections
|
|
48
|
+
sections={sections}
|
|
49
|
+
globalSections={globalSections}
|
|
50
|
+
components={COMPONENTS}
|
|
51
|
+
/>
|
|
69
52
|
</UseGalleryPageContext.Provider>
|
|
70
53
|
</PageProvider>
|
|
71
54
|
</>
|
|
@@ -26,12 +26,14 @@ export type SearchWrapperProps = {
|
|
|
26
26
|
itemsPerPage: number
|
|
27
27
|
searchContentType: SearchContentType
|
|
28
28
|
serverData: SearchPageContextType
|
|
29
|
+
globalSections?: Array<{ name: string; data: any }>
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
export default function SearchWrapper({
|
|
32
33
|
itemsPerPage,
|
|
33
34
|
searchContentType,
|
|
34
35
|
serverData,
|
|
36
|
+
globalSections,
|
|
35
37
|
}: SearchWrapperProps) {
|
|
36
38
|
const router = useRouter()
|
|
37
39
|
const {
|
|
@@ -64,6 +66,7 @@ export default function SearchWrapper({
|
|
|
64
66
|
<SearchPage
|
|
65
67
|
page={searchContentType}
|
|
66
68
|
data={{ ...serverData, ...pageProductGalleryData }}
|
|
69
|
+
globalSections={globalSections}
|
|
67
70
|
/>
|
|
68
71
|
)
|
|
69
72
|
}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
+
import dynamic from 'next/dynamic'
|
|
1
2
|
import { useEffect, useId, useRef } from 'react'
|
|
2
3
|
|
|
3
|
-
import ProductShelfSkeleton from 'src/components/skeletons/ProductShelfSkeleton'
|
|
4
4
|
import { useViewItemListEvent } from 'src/sdk/analytics/hooks/useViewItemListEvent'
|
|
5
5
|
import { useOverrideComponents } from 'src/sdk/overrides/OverrideContext'
|
|
6
6
|
import { useProductsQuery } from 'src/sdk/product/useProductsQuery'
|
|
7
7
|
import { textToKebabCase } from 'src/utils/utilities'
|
|
8
8
|
|
|
9
|
+
const ProductShelfSkeleton = dynamic(
|
|
10
|
+
() =>
|
|
11
|
+
/* webpackChunkName: "ProductShelfSkeleton" */
|
|
12
|
+
import('src/components/skeletons/ProductShelfSkeleton')
|
|
13
|
+
)
|
|
14
|
+
|
|
9
15
|
type Sort =
|
|
10
16
|
| 'discount_desc'
|
|
11
17
|
| 'name_asc'
|
package/src/pages/404.tsx
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { Locator } from '@vtex/client-cms'
|
|
2
2
|
import { GetStaticProps } from 'next'
|
|
3
3
|
import { NextSeo } from 'next-seo'
|
|
4
|
-
import
|
|
4
|
+
import type { ComponentType } from 'react'
|
|
5
|
+
import {
|
|
5
6
|
GlobalSectionsData,
|
|
6
7
|
getGlobalSectionsData,
|
|
7
8
|
} from 'src/components/cms/GlobalSections'
|
|
8
|
-
import type { ComponentType } from 'react'
|
|
9
9
|
|
|
10
|
+
import { default as GLOBAL_COMPONENTS } from 'src/components/cms/global/Components'
|
|
10
11
|
import RenderSections from 'src/components/cms/RenderSections'
|
|
11
12
|
import { OverriddenDefaultEmptyState as EmptyState } from 'src/components/sections/EmptyState/OverriddenDefaultEmptyState'
|
|
12
13
|
import CUSTOM_COMPONENTS from 'src/customizations/src/components'
|
|
@@ -14,6 +15,7 @@ import { PageContentType, getPage } from 'src/server/cms'
|
|
|
14
15
|
|
|
15
16
|
/* A list of components that can be used in the CMS. */
|
|
16
17
|
const COMPONENTS: Record<string, ComponentType<any>> = {
|
|
18
|
+
...GLOBAL_COMPONENTS,
|
|
17
19
|
EmptyState,
|
|
18
20
|
...CUSTOM_COMPONENTS,
|
|
19
21
|
}
|
|
@@ -25,7 +27,7 @@ type Props = {
|
|
|
25
27
|
|
|
26
28
|
function Page({ page: { sections }, globalSections }: Props) {
|
|
27
29
|
return (
|
|
28
|
-
|
|
30
|
+
<>
|
|
29
31
|
<NextSeo noindex nofollow />
|
|
30
32
|
{/*
|
|
31
33
|
WARNING: Do not import or render components from any
|
|
@@ -38,8 +40,12 @@ function Page({ page: { sections }, globalSections }: Props) {
|
|
|
38
40
|
If needed, wrap your component in a <Section /> component
|
|
39
41
|
(not the HTML tag) before rendering it here.
|
|
40
42
|
*/}
|
|
41
|
-
<RenderSections
|
|
42
|
-
|
|
43
|
+
<RenderSections
|
|
44
|
+
sections={sections}
|
|
45
|
+
globalSections={globalSections.sections}
|
|
46
|
+
components={COMPONENTS}
|
|
47
|
+
/>
|
|
48
|
+
</>
|
|
43
49
|
)
|
|
44
50
|
}
|
|
45
51
|
|
package/src/pages/500.tsx
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { Locator } from '@vtex/client-cms'
|
|
2
2
|
import { GetStaticProps } from 'next'
|
|
3
3
|
import { NextSeo } from 'next-seo'
|
|
4
|
-
import
|
|
4
|
+
import type { ComponentType } from 'react'
|
|
5
|
+
import {
|
|
5
6
|
GlobalSectionsData,
|
|
6
7
|
getGlobalSectionsData,
|
|
7
8
|
} from 'src/components/cms/GlobalSections'
|
|
8
|
-
import type { ComponentType } from 'react'
|
|
9
9
|
|
|
10
|
+
import { default as GLOBAL_COMPONENTS } from 'src/components/cms/global/Components'
|
|
10
11
|
import RenderSections from 'src/components/cms/RenderSections'
|
|
11
12
|
import { OverriddenDefaultEmptyState as EmptyState } from 'src/components/sections/EmptyState/OverriddenDefaultEmptyState'
|
|
12
13
|
import CUSTOM_COMPONENTS from 'src/customizations/src/components'
|
|
@@ -14,6 +15,7 @@ import { PageContentType, getPage } from 'src/server/cms'
|
|
|
14
15
|
|
|
15
16
|
/* A list of components that can be used in the CMS. */
|
|
16
17
|
const COMPONENTS: Record<string, ComponentType<any>> = {
|
|
18
|
+
...GLOBAL_COMPONENTS,
|
|
17
19
|
EmptyState,
|
|
18
20
|
...CUSTOM_COMPONENTS,
|
|
19
21
|
}
|
|
@@ -25,7 +27,7 @@ type Props = {
|
|
|
25
27
|
|
|
26
28
|
function Page({ page: { sections }, globalSections }: Props) {
|
|
27
29
|
return (
|
|
28
|
-
|
|
30
|
+
<>
|
|
29
31
|
<NextSeo noindex nofollow />
|
|
30
32
|
|
|
31
33
|
{/*
|
|
@@ -39,8 +41,12 @@ function Page({ page: { sections }, globalSections }: Props) {
|
|
|
39
41
|
If needed, wrap your component in a <Section /> component
|
|
40
42
|
(not the HTML tag) before rendering it here.
|
|
41
43
|
*/}
|
|
42
|
-
<RenderSections
|
|
43
|
-
|
|
44
|
+
<RenderSections
|
|
45
|
+
sections={sections}
|
|
46
|
+
globalSections={globalSections.sections}
|
|
47
|
+
components={COMPONENTS}
|
|
48
|
+
/>
|
|
49
|
+
</>
|
|
44
50
|
)
|
|
45
51
|
}
|
|
46
52
|
|
package/src/pages/[...slug].tsx
CHANGED
|
@@ -10,11 +10,12 @@ import type {
|
|
|
10
10
|
import { execute } from 'src/server'
|
|
11
11
|
|
|
12
12
|
import { Locator } from '@vtex/client-cms'
|
|
13
|
-
import
|
|
13
|
+
import dynamic from 'next/dynamic'
|
|
14
|
+
import {
|
|
14
15
|
getGlobalSectionsData,
|
|
15
16
|
GlobalSectionsData,
|
|
16
17
|
} from 'src/components/cms/GlobalSections'
|
|
17
|
-
import
|
|
18
|
+
import {
|
|
18
19
|
getLandingPageBySlug,
|
|
19
20
|
LandingPageProps,
|
|
20
21
|
} from 'src/components/templates/LandingPage'
|
|
@@ -25,6 +26,10 @@ import { PageContentType } from 'src/server/cms'
|
|
|
25
26
|
import { getPLP, PLPContentType } from 'src/server/cms/plp'
|
|
26
27
|
import { getDynamicContent } from 'src/utils/dynamicContent'
|
|
27
28
|
|
|
29
|
+
const LandingPage = dynamic(
|
|
30
|
+
() => import('src/components/templates/LandingPage')
|
|
31
|
+
)
|
|
32
|
+
|
|
28
33
|
type BaseProps = {
|
|
29
34
|
globalSections: GlobalSectionsData
|
|
30
35
|
}
|
|
@@ -46,12 +51,20 @@ type Props = BaseProps &
|
|
|
46
51
|
|
|
47
52
|
function Page({ globalSections, type, ...otherProps }: Props) {
|
|
48
53
|
return (
|
|
49
|
-
|
|
54
|
+
<>
|
|
50
55
|
{type === 'plp' && (
|
|
51
|
-
<ProductListingPage
|
|
56
|
+
<ProductListingPage
|
|
57
|
+
globalSections={globalSections.sections}
|
|
58
|
+
{...(otherProps as ProductListingPageProps)}
|
|
59
|
+
/>
|
|
60
|
+
)}
|
|
61
|
+
{type === 'page' && (
|
|
62
|
+
<LandingPage
|
|
63
|
+
globalSections={globalSections.sections}
|
|
64
|
+
{...(otherProps as LandingPageProps)}
|
|
65
|
+
/>
|
|
52
66
|
)}
|
|
53
|
-
|
|
54
|
-
</GlobalSections>
|
|
67
|
+
</>
|
|
55
68
|
)
|
|
56
69
|
}
|
|
57
70
|
|
|
@@ -93,13 +106,18 @@ export const getStaticProps: GetStaticProps<
|
|
|
93
106
|
getGlobalSectionsData(previewData),
|
|
94
107
|
]
|
|
95
108
|
|
|
96
|
-
|
|
97
|
-
|
|
109
|
+
const landingPage = await landingPagePromise
|
|
110
|
+
|
|
111
|
+
if (landingPage) {
|
|
112
|
+
const [serverData, globalSections] = await Promise.all([
|
|
113
|
+
getDynamicContent({ pageType: slug }),
|
|
114
|
+
globalSectionsPromise,
|
|
115
|
+
])
|
|
98
116
|
|
|
99
117
|
return {
|
|
100
118
|
props: {
|
|
101
|
-
page:
|
|
102
|
-
globalSections
|
|
119
|
+
page: landingPage,
|
|
120
|
+
globalSections,
|
|
103
121
|
type: 'page',
|
|
104
122
|
slug,
|
|
105
123
|
serverData,
|
|
@@ -107,7 +125,7 @@ export const getStaticProps: GetStaticProps<
|
|
|
107
125
|
}
|
|
108
126
|
}
|
|
109
127
|
|
|
110
|
-
const [{ data, errors = [] }, cmsPage] = await Promise.all([
|
|
128
|
+
const [{ data, errors = [] }, cmsPage, globalSections] = await Promise.all([
|
|
111
129
|
execute<
|
|
112
130
|
ServerCollectionPageQueryQueryVariables,
|
|
113
131
|
ServerCollectionPageQueryQuery
|
|
@@ -116,6 +134,7 @@ export const getStaticProps: GetStaticProps<
|
|
|
116
134
|
operation: query,
|
|
117
135
|
}),
|
|
118
136
|
getPLP(slug, previewData, rewrites),
|
|
137
|
+
globalSectionsPromise,
|
|
119
138
|
])
|
|
120
139
|
|
|
121
140
|
const notFound = errors.find(isNotFoundError)
|
|
@@ -135,7 +154,7 @@ export const getStaticProps: GetStaticProps<
|
|
|
135
154
|
props: {
|
|
136
155
|
data,
|
|
137
156
|
page: cmsPage,
|
|
138
|
-
globalSections
|
|
157
|
+
globalSections,
|
|
139
158
|
type: 'plp',
|
|
140
159
|
key: slug,
|
|
141
160
|
},
|
package/src/pages/[slug]/p.tsx
CHANGED
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
type ServerProductQueryQuery,
|
|
11
11
|
type ServerProductQueryQueryVariables,
|
|
12
12
|
} from '@generated/graphql'
|
|
13
|
+
import { default as GLOBAL_COMPONENTS } from 'src/components/cms/global/Components'
|
|
13
14
|
import RenderSections from 'src/components/cms/RenderSections'
|
|
14
15
|
import BannerNewsletter from 'src/components/sections/BannerNewsletter/BannerNewsletter'
|
|
15
16
|
import { OverriddenDefaultBannerText as BannerText } from 'src/components/sections/BannerText/OverriddenDefaultBannerText'
|
|
@@ -25,7 +26,7 @@ import { useSession } from 'src/sdk/session'
|
|
|
25
26
|
import { execute } from 'src/server'
|
|
26
27
|
|
|
27
28
|
import storeConfig from 'discovery.config'
|
|
28
|
-
import
|
|
29
|
+
import {
|
|
29
30
|
GlobalSectionsData,
|
|
30
31
|
getGlobalSectionsData,
|
|
31
32
|
} from 'src/components/cms/GlobalSections'
|
|
@@ -38,6 +39,7 @@ import { PDPContentType, getPDP } from 'src/server/cms/pdp'
|
|
|
38
39
|
* Do not import or render components from any other folder in here.
|
|
39
40
|
*/
|
|
40
41
|
const COMPONENTS: Record<string, ComponentType<any>> = {
|
|
42
|
+
...GLOBAL_COMPONENTS,
|
|
41
43
|
Breadcrumb,
|
|
42
44
|
BannerNewsletter,
|
|
43
45
|
Newsletter,
|
|
@@ -82,7 +84,7 @@ function Page({ data: server, sections, globalSections, offers, meta }: Props) {
|
|
|
82
84
|
} as PDPContext
|
|
83
85
|
|
|
84
86
|
return (
|
|
85
|
-
|
|
87
|
+
<>
|
|
86
88
|
{/* SEO */}
|
|
87
89
|
<NextSeo
|
|
88
90
|
title={meta.title}
|
|
@@ -136,9 +138,13 @@ function Page({ data: server, sections, globalSections, offers, meta }: Props) {
|
|
|
136
138
|
(not the HTML tag) before rendering it here.
|
|
137
139
|
*/}
|
|
138
140
|
<PageProvider context={context}>
|
|
139
|
-
<RenderSections
|
|
141
|
+
<RenderSections
|
|
142
|
+
sections={sections}
|
|
143
|
+
globalSections={globalSections.sections}
|
|
144
|
+
components={COMPONENTS}
|
|
145
|
+
/>
|
|
140
146
|
</PageProvider>
|
|
141
|
-
|
|
147
|
+
</>
|
|
142
148
|
)
|
|
143
149
|
}
|
|
144
150
|
|
package/src/pages/account.tsx
CHANGED
|
@@ -1,29 +1,41 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Locator } from '@vtex/client-cms'
|
|
2
|
+
import { GetStaticProps } from 'next'
|
|
2
3
|
import { NextSeo } from 'next-seo'
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import
|
|
4
|
+
import type { ComponentType } from 'react'
|
|
5
|
+
import { useEffect } from 'react'
|
|
6
|
+
import {
|
|
6
7
|
GlobalSectionsData,
|
|
7
8
|
getGlobalSectionsData,
|
|
8
9
|
} from 'src/components/cms/GlobalSections'
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
10
|
+
import RenderSections from 'src/components/cms/RenderSections'
|
|
11
|
+
import { default as GLOBAL_COMPONENTS } from 'src/components/cms/global/Components'
|
|
12
|
+
import CUSTOM_COMPONENTS from 'src/customizations/src/components'
|
|
13
|
+
import storeConfig from '../../discovery.config'
|
|
11
14
|
|
|
12
15
|
type Props = {
|
|
13
16
|
globalSections: GlobalSectionsData
|
|
14
17
|
}
|
|
15
18
|
|
|
19
|
+
/* A list of components that can be used in the CMS. */
|
|
20
|
+
const COMPONENTS: Record<string, ComponentType<any>> = {
|
|
21
|
+
...GLOBAL_COMPONENTS,
|
|
22
|
+
...CUSTOM_COMPONENTS,
|
|
23
|
+
}
|
|
24
|
+
|
|
16
25
|
function Page({ globalSections }: Props) {
|
|
17
26
|
useEffect(() => {
|
|
18
27
|
window.location.href = `${storeConfig.accountUrl}${window.location.search}`
|
|
19
28
|
}, [])
|
|
20
29
|
|
|
21
30
|
return (
|
|
22
|
-
<
|
|
31
|
+
<RenderSections
|
|
32
|
+
globalSections={globalSections.sections}
|
|
33
|
+
components={COMPONENTS}
|
|
34
|
+
>
|
|
23
35
|
<NextSeo noindex nofollow />
|
|
24
36
|
|
|
25
37
|
<div>loading...</div>
|
|
26
|
-
</
|
|
38
|
+
</RenderSections>
|
|
27
39
|
)
|
|
28
40
|
}
|
|
29
41
|
|
package/src/pages/checkout.tsx
CHANGED
|
@@ -1,29 +1,43 @@
|
|
|
1
|
-
import { useEffect } from 'react'
|
|
2
1
|
import { NextSeo } from 'next-seo'
|
|
2
|
+
import { useEffect } from 'react'
|
|
3
3
|
|
|
4
|
-
import
|
|
5
|
-
import
|
|
4
|
+
import { Locator } from '@vtex/client-cms'
|
|
5
|
+
import { GetStaticProps } from 'next'
|
|
6
|
+
import type { ComponentType } from 'react'
|
|
7
|
+
import { default as GLOBAL_COMPONENTS } from 'src/components/cms/global/Components'
|
|
8
|
+
import {
|
|
6
9
|
GlobalSectionsData,
|
|
7
10
|
getGlobalSectionsData,
|
|
8
11
|
} from 'src/components/cms/GlobalSections'
|
|
9
|
-
import
|
|
10
|
-
|
|
12
|
+
import CUSTOM_COMPONENTS from 'src/customizations/src/components'
|
|
13
|
+
|
|
14
|
+
import RenderSections from 'src/components/cms/RenderSections'
|
|
15
|
+
import storeConfig from '../../discovery.config'
|
|
11
16
|
|
|
12
17
|
type Props = {
|
|
13
18
|
globalSections: GlobalSectionsData
|
|
14
19
|
}
|
|
15
20
|
|
|
21
|
+
/* A list of components that can be used in the CMS. */
|
|
22
|
+
const COMPONENTS: Record<string, ComponentType<any>> = {
|
|
23
|
+
...GLOBAL_COMPONENTS,
|
|
24
|
+
...CUSTOM_COMPONENTS,
|
|
25
|
+
}
|
|
26
|
+
|
|
16
27
|
function Page({ globalSections }: Props) {
|
|
17
28
|
useEffect(() => {
|
|
18
29
|
window.location.href = storeConfig.checkoutUrl
|
|
19
30
|
}, [])
|
|
20
31
|
|
|
21
32
|
return (
|
|
22
|
-
<
|
|
33
|
+
<RenderSections
|
|
34
|
+
globalSections={globalSections.sections}
|
|
35
|
+
components={COMPONENTS}
|
|
36
|
+
>
|
|
23
37
|
<NextSeo noindex nofollow />
|
|
24
38
|
|
|
25
39
|
<div>loading...</div>
|
|
26
|
-
</
|
|
40
|
+
</RenderSections>
|
|
27
41
|
)
|
|
28
42
|
}
|
|
29
43
|
|
package/src/pages/index.tsx
CHANGED
|
@@ -1,38 +1,20 @@
|
|
|
1
1
|
import type { Locator } from '@vtex/client-cms'
|
|
2
2
|
import type { GetStaticProps } from 'next'
|
|
3
3
|
import { NextSeo, SiteLinksSearchBoxJsonLd } from 'next-seo'
|
|
4
|
-
import type { ComponentType } from 'react'
|
|
5
4
|
|
|
6
5
|
import RenderSections from 'src/components/cms/RenderSections'
|
|
7
|
-
import { OverriddenDefaultBannerText as BannerText } from 'src/components/sections/BannerText/OverriddenDefaultBannerText'
|
|
8
|
-
import { OverriddenDefaultHero as Hero } from 'src/components/sections/Hero/OverriddenDefaultHero'
|
|
9
|
-
import Incentives from 'src/components/sections/Incentives'
|
|
10
|
-
import { OverriddenDefaultNewsletter as Newsletter } from 'src/components/sections/Newsletter/OverriddenDefaultNewsletter'
|
|
11
|
-
import { OverriddenDefaultProductShelf as ProductShelf } from 'src/components/sections/ProductShelf/OverriddenDefaultProductShelf'
|
|
12
|
-
import ProductTiles from 'src/components/sections/ProductTiles'
|
|
13
|
-
import CUSTOM_COMPONENTS from 'src/customizations/src/components'
|
|
14
6
|
import type { PageContentType } from 'src/server/cms'
|
|
15
7
|
import { getPage } from 'src/server/cms'
|
|
16
8
|
|
|
17
|
-
import
|
|
9
|
+
import {
|
|
18
10
|
GlobalSectionsData,
|
|
19
11
|
getGlobalSectionsData,
|
|
20
12
|
} from 'src/components/cms/GlobalSections'
|
|
13
|
+
import COMPONENTS from 'src/components/cms/home/Components'
|
|
21
14
|
import PageProvider from 'src/sdk/overrides/PageProvider'
|
|
22
15
|
import { getDynamicContent } from 'src/utils/dynamicContent'
|
|
23
16
|
import storeConfig from '../../discovery.config'
|
|
24
17
|
|
|
25
|
-
/* A list of components that can be used in the CMS. */
|
|
26
|
-
const COMPONENTS: Record<string, ComponentType<any>> = {
|
|
27
|
-
Hero,
|
|
28
|
-
Incentives,
|
|
29
|
-
ProductShelf,
|
|
30
|
-
ProductTiles,
|
|
31
|
-
BannerText,
|
|
32
|
-
Newsletter,
|
|
33
|
-
...CUSTOM_COMPONENTS,
|
|
34
|
-
}
|
|
35
|
-
|
|
36
18
|
type Props = {
|
|
37
19
|
page: PageContentType
|
|
38
20
|
globalSections: GlobalSectionsData
|
|
@@ -49,7 +31,7 @@ function Page({
|
|
|
49
31
|
}
|
|
50
32
|
|
|
51
33
|
return (
|
|
52
|
-
|
|
34
|
+
<>
|
|
53
35
|
{/* SEO */}
|
|
54
36
|
<NextSeo
|
|
55
37
|
title={settings?.seo?.title ?? storeConfig.seo.title}
|
|
@@ -86,9 +68,13 @@ function Page({
|
|
|
86
68
|
(not the HTML tag) before rendering it here.
|
|
87
69
|
*/}
|
|
88
70
|
<PageProvider context={context}>
|
|
89
|
-
<RenderSections
|
|
71
|
+
<RenderSections
|
|
72
|
+
globalSections={globalSections.sections}
|
|
73
|
+
sections={sections}
|
|
74
|
+
components={COMPONENTS}
|
|
75
|
+
/>
|
|
90
76
|
</PageProvider>
|
|
91
|
-
|
|
77
|
+
</>
|
|
92
78
|
)
|
|
93
79
|
}
|
|
94
80
|
|
package/src/pages/login.tsx
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import { useEffect } from 'react'
|
|
2
1
|
import { NextSeo } from 'next-seo'
|
|
3
2
|
import type { ComponentType } from 'react'
|
|
3
|
+
import { useEffect } from 'react'
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
import
|
|
5
|
+
import { Locator } from '@vtex/client-cms'
|
|
6
|
+
import { GetStaticProps } from 'next'
|
|
7
|
+
import { default as GLOBAL_COMPONENTS } from 'src/components/cms/global/Components'
|
|
8
|
+
import {
|
|
7
9
|
GlobalSectionsData,
|
|
8
10
|
getGlobalSectionsData,
|
|
9
11
|
} from 'src/components/cms/GlobalSections'
|
|
10
|
-
import { GetStaticProps } from 'next'
|
|
11
|
-
import { Locator } from '@vtex/client-cms'
|
|
12
12
|
import RenderSections from 'src/components/cms/RenderSections'
|
|
13
13
|
import { OverriddenDefaultEmptyState as EmptyState } from 'src/components/sections/EmptyState/OverriddenDefaultEmptyState'
|
|
14
14
|
import CUSTOM_COMPONENTS from 'src/customizations/src/components'
|
|
15
15
|
import { PageContentType, getPage } from 'src/server/cms'
|
|
16
|
+
import storeConfig from '../../discovery.config'
|
|
16
17
|
|
|
17
18
|
/* A list of components that can be used in the CMS. */
|
|
18
19
|
const COMPONENTS: Record<string, ComponentType<any>> = {
|
|
20
|
+
...GLOBAL_COMPONENTS,
|
|
19
21
|
EmptyState,
|
|
20
22
|
...CUSTOM_COMPONENTS,
|
|
21
23
|
}
|
|
@@ -38,7 +40,7 @@ function Page({ page: { sections }, globalSections }: Props) {
|
|
|
38
40
|
}, [])
|
|
39
41
|
|
|
40
42
|
return (
|
|
41
|
-
|
|
43
|
+
<>
|
|
42
44
|
<NextSeo noindex nofollow />
|
|
43
45
|
{/*
|
|
44
46
|
WARNING: Do not import or render components from any
|
|
@@ -51,8 +53,12 @@ function Page({ page: { sections }, globalSections }: Props) {
|
|
|
51
53
|
If needed, wrap your component in a <Section /> component
|
|
52
54
|
(not the HTML tag) before rendering it here.
|
|
53
55
|
*/}
|
|
54
|
-
<RenderSections
|
|
55
|
-
|
|
56
|
+
<RenderSections
|
|
57
|
+
sections={sections}
|
|
58
|
+
globalSections={globalSections.sections}
|
|
59
|
+
components={COMPONENTS}
|
|
60
|
+
/>
|
|
61
|
+
</>
|
|
56
62
|
)
|
|
57
63
|
}
|
|
58
64
|
|
package/src/pages/s.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { GetStaticProps } from 'next'
|
|
2
2
|
import { NextSeo } from 'next-seo'
|
|
3
3
|
import { useRouter } from 'next/router'
|
|
4
|
-
import
|
|
4
|
+
import { useMemo } from 'react'
|
|
5
5
|
|
|
6
6
|
import type { SearchState } from '@faststore/sdk'
|
|
7
7
|
import {
|
|
@@ -16,7 +16,7 @@ import { useApplySearchState } from 'src/sdk/search/state'
|
|
|
16
16
|
|
|
17
17
|
import { Locator } from '@vtex/client-cms'
|
|
18
18
|
import storeConfig from 'discovery.config'
|
|
19
|
-
import
|
|
19
|
+
import {
|
|
20
20
|
getGlobalSectionsData,
|
|
21
21
|
GlobalSectionsData,
|
|
22
22
|
} from 'src/components/cms/GlobalSections'
|
|
@@ -70,28 +70,27 @@ function Page({ page: searchContentType, globalSections }: Props) {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
return (
|
|
73
|
-
<
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
{/*
|
|
73
|
+
<SearchProvider
|
|
74
|
+
onChange={applySearchState}
|
|
75
|
+
itemsPerPage={itemsPerPage}
|
|
76
|
+
{...searchParams}
|
|
77
|
+
>
|
|
78
|
+
{/* SEO */}
|
|
79
|
+
<NextSeo
|
|
80
|
+
noindex
|
|
81
|
+
title={title}
|
|
82
|
+
description={description}
|
|
83
|
+
titleTemplate={titleTemplate}
|
|
84
|
+
openGraph={{
|
|
85
|
+
type: 'website',
|
|
86
|
+
title,
|
|
87
|
+
description,
|
|
88
|
+
}}
|
|
89
|
+
/>
|
|
90
|
+
|
|
91
|
+
<UISROnly text={title} />
|
|
92
|
+
|
|
93
|
+
{/*
|
|
95
94
|
WARNING: Do not import or render components from any
|
|
96
95
|
other folder than '../components/sections' in here.
|
|
97
96
|
|
|
@@ -102,16 +101,16 @@ function Page({ page: searchContentType, globalSections }: Props) {
|
|
|
102
101
|
If needed, wrap your component in a <Section /> component
|
|
103
102
|
(not the HTML tag) before rendering it here.
|
|
104
103
|
*/}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
</
|
|
104
|
+
<SearchWrapper
|
|
105
|
+
itemsPerPage={itemsPerPage}
|
|
106
|
+
searchContentType={searchContentType}
|
|
107
|
+
serverData={{
|
|
108
|
+
title,
|
|
109
|
+
searchTerm: searchParams.term ?? undefined,
|
|
110
|
+
}}
|
|
111
|
+
globalSections={globalSections.sections}
|
|
112
|
+
/>
|
|
113
|
+
</SearchProvider>
|
|
115
114
|
)
|
|
116
115
|
}
|
|
117
116
|
|