@faststore/core 2.0.117-alpha.0 → 2.0.120-alpha.0

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.
Files changed (160) hide show
  1. package/.turbo/turbo-build.log +38 -26
  2. package/CHANGELOG.md +10 -0
  3. package/cms/faststore/content-types.json +6 -0
  4. package/cms/faststore/sections.json +8 -0
  5. package/package.json +3 -3
  6. package/src/Layout.tsx +2 -24
  7. package/src/components/cms/GlobalSections.tsx +81 -0
  8. package/src/components/cms/RenderSections.tsx +39 -0
  9. package/src/components/common/Alert/Alert.tsx +7 -5
  10. package/src/components/common/Alert/index.ts +1 -0
  11. package/src/components/sections/Alert/Alert.tsx +28 -0
  12. package/src/pages/404.tsx +25 -3
  13. package/src/pages/500.tsx +25 -3
  14. package/src/pages/[...slug].tsx +85 -66
  15. package/src/pages/[slug]/p.tsx +16 -6
  16. package/src/pages/account.tsx +25 -3
  17. package/src/pages/checkout.tsx +25 -3
  18. package/src/pages/index.tsx +20 -10
  19. package/src/pages/login.tsx +25 -3
  20. package/src/pages/s.tsx +63 -39
  21. package/.next/BUILD_ID +0 -1
  22. package/.next/build-manifest.json +0 -99
  23. package/.next/cache/.tsbuildinfo +0 -1
  24. package/.next/cache/config.json +0 -7
  25. package/.next/cache/eslint/.cache_1gneedd +0 -1
  26. package/.next/cache/next-server.js.nft.json +0 -1
  27. package/.next/cache/webpack/client-production/0.pack +0 -0
  28. package/.next/cache/webpack/client-production/index.pack +0 -0
  29. package/.next/cache/webpack/server-production/0.pack +0 -0
  30. package/.next/cache/webpack/server-production/index.pack +0 -0
  31. package/.next/export-marker.json +0 -1
  32. package/.next/images-manifest.json +0 -1
  33. package/.next/next-server.js.nft.json +0 -1
  34. package/.next/package.json +0 -1
  35. package/.next/prerender-manifest.json +0 -1
  36. package/.next/react-loadable-manifest.json +0 -42
  37. package/.next/required-server-files.json +0 -1
  38. package/.next/routes-manifest.json +0 -1
  39. package/.next/server/chunks/120.js +0 -435
  40. package/.next/server/chunks/123.js +0 -58
  41. package/.next/server/chunks/1394.js +0 -3801
  42. package/.next/server/chunks/1597.js +0 -151
  43. package/.next/server/chunks/1608.js +0 -515
  44. package/.next/server/chunks/2154.js +0 -206
  45. package/.next/server/chunks/247.js +0 -61
  46. package/.next/server/chunks/2502.js +0 -584
  47. package/.next/server/chunks/2914.js +0 -95
  48. package/.next/server/chunks/2922.js +0 -7293
  49. package/.next/server/chunks/3264.js +0 -67
  50. package/.next/server/chunks/3431.js +0 -7241
  51. package/.next/server/chunks/350.js +0 -142
  52. package/.next/server/chunks/3746.js +0 -250
  53. package/.next/server/chunks/3898.js +0 -240
  54. package/.next/server/chunks/4312.js +0 -674
  55. package/.next/server/chunks/4371.js +0 -1424
  56. package/.next/server/chunks/5098.js +0 -124
  57. package/.next/server/chunks/5335.js +0 -544
  58. package/.next/server/chunks/5576.js +0 -79
  59. package/.next/server/chunks/6280.js +0 -322
  60. package/.next/server/chunks/6465.js +0 -91
  61. package/.next/server/chunks/676.js +0 -32
  62. package/.next/server/chunks/6859.js +0 -959
  63. package/.next/server/chunks/6881.js +0 -320
  64. package/.next/server/chunks/6898.js +0 -149
  65. package/.next/server/chunks/7104.js +0 -235
  66. package/.next/server/chunks/7181.js +0 -664
  67. package/.next/server/chunks/7183.js +0 -79
  68. package/.next/server/chunks/8098.js +0 -246
  69. package/.next/server/chunks/810.js +0 -432
  70. package/.next/server/chunks/8287.js +0 -58
  71. package/.next/server/chunks/9143.js +0 -106
  72. package/.next/server/chunks/9557.js +0 -119
  73. package/.next/server/chunks/9854.js +0 -72
  74. package/.next/server/chunks/font-manifest.json +0 -1
  75. package/.next/server/font-manifest.json +0 -1
  76. package/.next/server/middleware-build-manifest.js +0 -1
  77. package/.next/server/middleware-manifest.json +0 -6
  78. package/.next/server/middleware-react-loadable-manifest.js +0 -1
  79. package/.next/server/pages/404.js.nft.json +0 -1
  80. package/.next/server/pages/500.js.nft.json +0 -1
  81. package/.next/server/pages/[...slug].js +0 -666
  82. package/.next/server/pages/[...slug].js.nft.json +0 -1
  83. package/.next/server/pages/[slug]/p.js +0 -2327
  84. package/.next/server/pages/[slug]/p.js.nft.json +0 -1
  85. package/.next/server/pages/_app.js +0 -2454
  86. package/.next/server/pages/_app.js.nft.json +0 -1
  87. package/.next/server/pages/_document.js +0 -304
  88. package/.next/server/pages/_document.js.nft.json +0 -1
  89. package/.next/server/pages/_error.js +0 -164
  90. package/.next/server/pages/_error.js.nft.json +0 -1
  91. package/.next/server/pages/account.js.nft.json +0 -1
  92. package/.next/server/pages/api/graphql.js +0 -315
  93. package/.next/server/pages/api/graphql.js.nft.json +0 -1
  94. package/.next/server/pages/api/preview.js +0 -118
  95. package/.next/server/pages/api/preview.js.nft.json +0 -1
  96. package/.next/server/pages/checkout.js.nft.json +0 -1
  97. package/.next/server/pages/en-US/404.html +0 -81
  98. package/.next/server/pages/en-US/500.html +0 -81
  99. package/.next/server/pages/en-US/account.html +0 -81
  100. package/.next/server/pages/en-US/checkout.html +0 -81
  101. package/.next/server/pages/en-US/login.html +0 -81
  102. package/.next/server/pages/en-US/s.html +0 -81
  103. package/.next/server/pages/en-US.html +0 -81
  104. package/.next/server/pages/en-US.json +0 -1
  105. package/.next/server/pages/index.js +0 -475
  106. package/.next/server/pages/index.js.nft.json +0 -1
  107. package/.next/server/pages/login.js.nft.json +0 -1
  108. package/.next/server/pages/s.js.nft.json +0 -1
  109. package/.next/server/pages-manifest.json +0 -16
  110. package/.next/server/webpack-api-runtime.js +0 -229
  111. package/.next/server/webpack-runtime.js +0 -229
  112. package/.next/static/chunks/143.dd8a556e6957baa1.js +0 -1
  113. package/.next/static/chunks/170.79b2f8527e327bca.js +0 -1
  114. package/.next/static/chunks/264-5b07911df63b8601.js +0 -1
  115. package/.next/static/chunks/351-a4e28d64f48c5269.js +0 -1
  116. package/.next/static/chunks/54.e6562383f8a1dfe7.js +0 -1
  117. package/.next/static/chunks/597.fc79494903e8bb84.js +0 -1
  118. package/.next/static/chunks/608.59e69b83f35d9c44.js +0 -1
  119. package/.next/static/chunks/651.7142f31ce1e052b3.js +0 -1
  120. package/.next/static/chunks/741.52f7fb873418346f.js +0 -1
  121. package/.next/static/chunks/781-e1b538e051ff4c3e.js +0 -1
  122. package/.next/static/chunks/98.97381d2021f86cd9.js +0 -1
  123. package/.next/static/chunks/996.98e590872c51f815.js +0 -1
  124. package/.next/static/chunks/framework-dfd14d7ce6600b03.js +0 -1
  125. package/.next/static/chunks/main-9746772201fe3ac1.js +0 -1
  126. package/.next/static/chunks/pages/404-3637ef83b3359df7.js +0 -1
  127. package/.next/static/chunks/pages/500-910883c20541d9ce.js +0 -1
  128. package/.next/static/chunks/pages/[...slug]-29d3b81ee0953846.js +0 -1
  129. package/.next/static/chunks/pages/[slug]/p-9b24055cb30ee7a8.js +0 -1
  130. package/.next/static/chunks/pages/_app-4aeb21d72aeea9b7.js +0 -1
  131. package/.next/static/chunks/pages/_error-a7a0c1d9bfbb4f38.js +0 -1
  132. package/.next/static/chunks/pages/account-b8fc5222ffe89b60.js +0 -1
  133. package/.next/static/chunks/pages/checkout-f8cb7cb22225ef9d.js +0 -1
  134. package/.next/static/chunks/pages/index-d48285f48d2a66ea.js +0 -1
  135. package/.next/static/chunks/pages/login-45cc84352bac2408.js +0 -1
  136. package/.next/static/chunks/pages/s-ba2868e14fedb65b.js +0 -1
  137. package/.next/static/chunks/polyfills-c67a75d1b6f99dc8.js +0 -1
  138. package/.next/static/chunks/webpack-f725b61675603493.js +0 -1
  139. package/.next/static/css/1f987650dd4e39d0.css +0 -1
  140. package/.next/static/css/3a57acf6e411f24d.css +0 -1
  141. package/.next/static/css/4abccf9803c3c356.css +0 -1
  142. package/.next/static/css/502746c995f64cce.css +0 -1
  143. package/.next/static/css/6507cb48401e73a4.css +0 -1
  144. package/.next/static/css/6f4d3e91f1d161a8.css +0 -1
  145. package/.next/static/kFT8gMGQbscGgKaZLxG_K/_buildManifest.js +0 -1
  146. package/.next/static/kFT8gMGQbscGgKaZLxG_K/_ssgManifest.js +0 -1
  147. package/.next/static/media/brandless-neutral.76ddf63a.png +0 -0
  148. package/.next/trace +0 -64
  149. package/public/~partytown/debug/partytown-atomics.js +0 -556
  150. package/public/~partytown/debug/partytown-media.js +0 -374
  151. package/public/~partytown/debug/partytown-sandbox-sw.js +0 -543
  152. package/public/~partytown/debug/partytown-sw.js +0 -59
  153. package/public/~partytown/debug/partytown-ww-atomics.js +0 -1789
  154. package/public/~partytown/debug/partytown-ww-sw.js +0 -1781
  155. package/public/~partytown/debug/partytown.js +0 -72
  156. package/public/~partytown/partytown-atomics.js +0 -2
  157. package/public/~partytown/partytown-media.js +0 -2
  158. package/public/~partytown/partytown-sw.js +0 -2
  159. package/public/~partytown/partytown.js +0 -2
  160. package/src/components/cms/RenderPageSections.tsx +0 -37
@@ -9,7 +9,7 @@ import type {
9
9
  ServerProductPageQueryQuery,
10
10
  ServerProductPageQueryQueryVariables,
11
11
  } from '@generated/graphql'
12
- import RenderPageSections from 'src/components/cms/RenderPageSections'
12
+ import RenderSections from 'src/components/cms/RenderSections'
13
13
  import BannerNewsletter from 'src/components/sections/BannerNewsletter/BannerNewsletter'
14
14
  import CrossSellingShelf from 'src/components/sections/CrossSellingShelf'
15
15
  import ProductDetails from 'src/components/sections/ProductDetails'
@@ -21,6 +21,10 @@ import type { PDPContentType } from 'src/server/cms'
21
21
  import { getPage } from 'src/server/cms'
22
22
 
23
23
  import storeConfig from '../../../faststore.config'
24
+ import GlobalSections, {
25
+ GlobalSectionsData,
26
+ getGlobalSectionsData,
27
+ } from 'src/components/cms/GlobalSections'
24
28
 
25
29
  /**
26
30
  * Sections: Components imported from each store's custom components and '../components/sections' only.
@@ -33,9 +37,12 @@ const COMPONENTS: Record<string, ComponentType<any>> = {
33
37
  ...CUSTOM_COMPONENTS,
34
38
  }
35
39
 
36
- type Props = ServerProductPageQueryQuery & PDPContentType
40
+ type Props = ServerProductPageQueryQuery &
41
+ PDPContentType & {
42
+ globalSections: GlobalSectionsData
43
+ }
37
44
 
38
- function Page({ product, sections }: Props) {
45
+ function Page({ product, sections, globalSections }: Props) {
39
46
  const { currency } = useSession()
40
47
  const { seo } = product
41
48
  const title = seo.title || storeConfig.seo.title
@@ -43,7 +50,7 @@ function Page({ product, sections }: Props) {
43
50
  const canonical = `${storeConfig.storeUrl}${seo.canonical}`
44
51
 
45
52
  return (
46
- <>
53
+ <GlobalSections {...globalSections}>
47
54
  {/* SEO */}
48
55
  <NextSeo
49
56
  title={title}
@@ -100,12 +107,12 @@ function Page({ product, sections }: Props) {
100
107
  If needed, wrap your component in a <Section /> component
101
108
  (not the HTML tag) before rendering it here.
102
109
  */}
103
- <RenderPageSections
110
+ <RenderSections
104
111
  context={product}
105
112
  sections={sections}
106
113
  components={COMPONENTS}
107
114
  />
108
- </>
115
+ </GlobalSections>
109
116
  )
110
117
  }
111
118
 
@@ -199,10 +206,13 @@ export const getStaticProps: GetStaticProps<
199
206
  throw errors[0]
200
207
  }
201
208
 
209
+ const globalSections = await getGlobalSectionsData(previewData)
210
+
202
211
  return {
203
212
  props: {
204
213
  ...data,
205
214
  ...cmsPage,
215
+ globalSections,
206
216
  },
207
217
  }
208
218
  }
@@ -2,19 +2,41 @@ import { useEffect } from 'react'
2
2
  import { NextSeo } from 'next-seo'
3
3
 
4
4
  import storeConfig from '../../faststore.config'
5
+ import GlobalSections, {
6
+ GlobalSectionsData,
7
+ getGlobalSectionsData,
8
+ } from 'src/components/cms/GlobalSections'
9
+ import { GetStaticProps } from 'next'
10
+ import { Locator } from '@vtex/client-cms'
5
11
 
6
- function Page() {
12
+ type Props = {
13
+ globalSections: GlobalSectionsData
14
+ }
15
+
16
+ function Page({ globalSections }: Props) {
7
17
  useEffect(() => {
8
18
  window.location.href = `${storeConfig.accountUrl}${window.location.search}`
9
19
  }, [])
10
20
 
11
21
  return (
12
- <>
22
+ <GlobalSections {...globalSections}>
13
23
  <NextSeo noindex nofollow />
14
24
 
15
25
  <div>loading...</div>
16
- </>
26
+ </GlobalSections>
17
27
  )
18
28
  }
19
29
 
30
+ export const getStaticProps: GetStaticProps<
31
+ Props,
32
+ Record<string, string>,
33
+ Locator
34
+ > = async ({ previewData }) => {
35
+ const globalSections = await getGlobalSectionsData(previewData)
36
+
37
+ return {
38
+ props: { globalSections },
39
+ }
40
+ }
41
+
20
42
  export default Page
@@ -2,19 +2,41 @@ import { useEffect } from 'react'
2
2
  import { NextSeo } from 'next-seo'
3
3
 
4
4
  import storeConfig from '../../faststore.config'
5
+ import GlobalSections, {
6
+ GlobalSectionsData,
7
+ getGlobalSectionsData,
8
+ } from 'src/components/cms/GlobalSections'
9
+ import { GetStaticProps } from 'next'
10
+ import { Locator } from '@vtex/client-cms'
5
11
 
6
- function Page() {
12
+ type Props = {
13
+ globalSections: GlobalSectionsData
14
+ }
15
+
16
+ function Page({ globalSections }: Props) {
7
17
  useEffect(() => {
8
18
  window.location.href = storeConfig.checkoutUrl
9
19
  }, [])
10
20
 
11
21
  return (
12
- <>
22
+ <GlobalSections {...globalSections}>
13
23
  <NextSeo noindex nofollow />
14
24
 
15
25
  <div>loading...</div>
16
- </>
26
+ </GlobalSections>
17
27
  )
18
28
  }
19
29
 
30
+ export const getStaticProps: GetStaticProps<
31
+ Props,
32
+ Record<string, string>,
33
+ Locator
34
+ > = async ({ previewData }) => {
35
+ const globalSections = await getGlobalSectionsData(previewData)
36
+
37
+ return {
38
+ props: { globalSections },
39
+ }
40
+ }
41
+
20
42
  export default Page
@@ -3,7 +3,7 @@ import type { GetStaticProps } from 'next'
3
3
  import { NextSeo, SiteLinksSearchBoxJsonLd } from 'next-seo'
4
4
  import type { ComponentType } from 'react'
5
5
 
6
- import RenderPageSections from 'src/components/cms/RenderPageSections'
6
+ import RenderSections from 'src/components/cms/RenderSections'
7
7
  import BannerText from 'src/components/sections/BannerText'
8
8
  import Hero from 'src/components/sections/Hero'
9
9
  import IncentivesHeader from 'src/components/sections/Incentives/IncentivesHeader'
@@ -16,6 +16,10 @@ import type { PageContentType } from 'src/server/cms'
16
16
  import { getPage } from 'src/server/cms'
17
17
 
18
18
  import storeConfig from '../../faststore.config'
19
+ import GlobalSections, {
20
+ GlobalSectionsData,
21
+ getGlobalSectionsData,
22
+ } from 'src/components/cms/GlobalSections'
19
23
 
20
24
  /* A list of components that can be used in the CMS. */
21
25
  const COMPONENTS: Record<string, ComponentType<any>> = {
@@ -28,11 +32,14 @@ const COMPONENTS: Record<string, ComponentType<any>> = {
28
32
  ...CUSTOM_COMPONENTS,
29
33
  }
30
34
 
31
- type Props = PageContentType
35
+ type Props = {
36
+ page: PageContentType
37
+ globalSections: GlobalSectionsData
38
+ }
32
39
 
33
- function Page({ sections, settings }: Props) {
40
+ function Page({ page: { sections, settings }, globalSections }: Props) {
34
41
  return (
35
- <>
42
+ <GlobalSections {...globalSections}>
36
43
  {/* SEO */}
37
44
  <NextSeo
38
45
  title={settings.seo.title}
@@ -67,8 +74,8 @@ function Page({ sections, settings }: Props) {
67
74
  If needed, wrap your component in a <Section /> component
68
75
  (not the HTML tag) before rendering it here.
69
76
  */}
70
- <RenderPageSections sections={sections} components={COMPONENTS} />
71
- </>
77
+ <RenderSections sections={sections} components={COMPONENTS} />
78
+ </GlobalSections>
72
79
  )
73
80
  }
74
81
 
@@ -76,18 +83,21 @@ export const getStaticProps: GetStaticProps<
76
83
  Props,
77
84
  Record<string, string>,
78
85
  Locator
79
- > = async (context) => {
86
+ > = async ({ previewData }) => {
80
87
  const page = await getPage<PageContentType>({
81
- ...(context.previewData?.contentType === 'page'
82
- ? context.previewData
88
+ ...(previewData?.contentType === 'page'
89
+ ? previewData
83
90
  : { filters: { 'settings.seo.slug': '/' } }),
84
91
  contentType: 'page',
85
92
  })
86
93
 
94
+ const globalSections = await getGlobalSectionsData(previewData)
95
+
87
96
  return {
88
- props: page,
97
+ props: { page, globalSections },
89
98
  }
90
99
  }
91
100
 
92
101
  Page.displayName = 'Page'
102
+
93
103
  export default mark(Page)
@@ -3,21 +3,43 @@ import { NextSeo } from 'next-seo'
3
3
  import { EmptyState as UIEmptyState, Loader as UILoader } from '@faststore/ui'
4
4
 
5
5
  import storeConfig from '../../faststore.config'
6
+ import GlobalSections, {
7
+ GlobalSectionsData,
8
+ getGlobalSectionsData,
9
+ } from 'src/components/cms/GlobalSections'
10
+ import { GetStaticProps } from 'next'
11
+ import { Locator } from '@vtex/client-cms'
6
12
 
7
- function Page() {
13
+ type Props = {
14
+ globalSections: GlobalSectionsData
15
+ }
16
+
17
+ function Page({ globalSections }: Props) {
8
18
  useEffect(() => {
9
19
  window.location.href = `${storeConfig.loginUrl}${window.location.search}`
10
20
  }, [])
11
21
 
12
22
  return (
13
- <>
23
+ <GlobalSections {...globalSections}>
14
24
  <NextSeo noindex nofollow />
15
25
 
16
26
  <UIEmptyState title="Loading" bkgColor="light">
17
27
  <UILoader />
18
28
  </UIEmptyState>
19
- </>
29
+ </GlobalSections>
20
30
  )
21
31
  }
22
32
 
33
+ export const getStaticProps: GetStaticProps<
34
+ Props,
35
+ Record<string, string>,
36
+ Locator
37
+ > = async ({ previewData }) => {
38
+ const globalSections = await getGlobalSectionsData(previewData)
39
+
40
+ return {
41
+ props: { globalSections },
42
+ }
43
+ }
44
+
23
45
  export default Page
package/src/pages/s.tsx CHANGED
@@ -12,6 +12,16 @@ import { useApplySearchState } from 'src/sdk/search/state'
12
12
  import { mark } from 'src/sdk/tests/mark'
13
13
 
14
14
  import storeConfig from '../../faststore.config'
15
+ import GlobalSections, {
16
+ getGlobalSectionsData,
17
+ GlobalSectionsData,
18
+ } from 'src/components/cms/GlobalSections'
19
+ import { Locator } from '@vtex/client-cms'
20
+ import { GetStaticProps } from 'next'
21
+
22
+ type Props = {
23
+ globalSections: GlobalSectionsData
24
+ }
15
25
 
16
26
  const useSearchParams = () => {
17
27
  const [params, setParams] = useState<SearchState | null>(null)
@@ -26,7 +36,7 @@ const useSearchParams = () => {
26
36
  return params
27
37
  }
28
38
 
29
- function Page() {
39
+ function Page({ globalSections }: Props) {
30
40
  const searchParams = useSearchParams()
31
41
  const applySearchState = useApplySearchState()
32
42
  const title = 'Search Results'
@@ -37,47 +47,61 @@ function Page() {
37
47
  }
38
48
 
39
49
  return (
40
- <SearchProvider
41
- onChange={applySearchState}
42
- itemsPerPage={ITEMS_PER_PAGE}
43
- {...searchParams}
44
- >
45
- {/* SEO */}
46
- <NextSeo
47
- noindex
48
- title={title}
49
- description={description}
50
- titleTemplate={titleTemplate}
51
- openGraph={{
52
- type: 'website',
53
- title,
54
- description,
55
- }}
56
- />
57
-
58
- <UISROnly as="h1" text={title} />
59
-
60
- {/*
61
- WARNING: Do not import or render components from any
62
- other folder than '../components/sections' in here.
63
-
64
- This is necessary to keep the integration with the CMS
65
- easy and consistent, enabling the change and reorder
66
- of elements on this page.
67
-
68
- If needed, wrap your component in a <Section /> component
69
- (not the HTML tag) before rendering it here.
70
- */}
71
- <Breadcrumb name="All Products" />
72
-
73
- <ProductGallery
74
- title="Search Results"
75
- searchTerm={searchParams.term ?? undefined}
76
- />
77
- </SearchProvider>
50
+ <GlobalSections {...globalSections}>
51
+ <SearchProvider
52
+ onChange={applySearchState}
53
+ itemsPerPage={ITEMS_PER_PAGE}
54
+ {...searchParams}
55
+ >
56
+ {/* SEO */}
57
+ <NextSeo
58
+ noindex
59
+ title={title}
60
+ description={description}
61
+ titleTemplate={titleTemplate}
62
+ openGraph={{
63
+ type: 'website',
64
+ title,
65
+ description,
66
+ }}
67
+ />
68
+
69
+ <UISROnly as="h1" text={title} />
70
+
71
+ {/*
72
+ WARNING: Do not import or render components from any
73
+ other folder than '../components/sections' in here.
74
+
75
+ This is necessary to keep the integration with the CMS
76
+ easy and consistent, enabling the change and reorder
77
+ of elements on this page.
78
+
79
+ If needed, wrap your component in a <Section /> component
80
+ (not the HTML tag) before rendering it here.
81
+ */}
82
+ <Breadcrumb name="All Products" />
83
+
84
+ <ProductGallery
85
+ title="Search Results"
86
+ searchTerm={searchParams.term ?? undefined}
87
+ />
88
+ </SearchProvider>
89
+ </GlobalSections>
78
90
  )
79
91
  }
80
92
 
93
+ export const getStaticProps: GetStaticProps<
94
+ Props,
95
+ Record<string, string>,
96
+ Locator
97
+ > = async ({ previewData }) => {
98
+ const globalSections = await getGlobalSectionsData(previewData)
99
+
100
+ return {
101
+ props: { globalSections },
102
+ }
103
+ }
104
+
81
105
  Page.displayName = 'Page'
82
106
 
83
107
  export default mark(Page)
package/.next/BUILD_ID DELETED
@@ -1 +0,0 @@
1
- kFT8gMGQbscGgKaZLxG_K
@@ -1,99 +0,0 @@
1
- {
2
- "polyfillFiles": [
3
- "static/chunks/polyfills-c67a75d1b6f99dc8.js"
4
- ],
5
- "devFiles": [],
6
- "ampDevFiles": [],
7
- "lowPriorityFiles": [
8
- "static/kFT8gMGQbscGgKaZLxG_K/_buildManifest.js",
9
- "static/kFT8gMGQbscGgKaZLxG_K/_ssgManifest.js"
10
- ],
11
- "rootMainFiles": [],
12
- "pages": {
13
- "/": [
14
- "static/chunks/webpack-f725b61675603493.js",
15
- "static/chunks/framework-dfd14d7ce6600b03.js",
16
- "static/chunks/main-9746772201fe3ac1.js",
17
- "static/chunks/351-a4e28d64f48c5269.js",
18
- "static/chunks/781-e1b538e051ff4c3e.js",
19
- "static/css/3a57acf6e411f24d.css",
20
- "static/chunks/pages/index-d48285f48d2a66ea.js"
21
- ],
22
- "/404": [
23
- "static/chunks/webpack-f725b61675603493.js",
24
- "static/chunks/framework-dfd14d7ce6600b03.js",
25
- "static/chunks/main-9746772201fe3ac1.js",
26
- "static/chunks/351-a4e28d64f48c5269.js",
27
- "static/chunks/pages/404-3637ef83b3359df7.js"
28
- ],
29
- "/500": [
30
- "static/chunks/webpack-f725b61675603493.js",
31
- "static/chunks/framework-dfd14d7ce6600b03.js",
32
- "static/chunks/main-9746772201fe3ac1.js",
33
- "static/chunks/351-a4e28d64f48c5269.js",
34
- "static/chunks/pages/500-910883c20541d9ce.js"
35
- ],
36
- "/[...slug]": [
37
- "static/chunks/webpack-f725b61675603493.js",
38
- "static/chunks/framework-dfd14d7ce6600b03.js",
39
- "static/chunks/main-9746772201fe3ac1.js",
40
- "static/chunks/351-a4e28d64f48c5269.js",
41
- "static/chunks/264-5b07911df63b8601.js",
42
- "static/css/1f987650dd4e39d0.css",
43
- "static/chunks/pages/[...slug]-29d3b81ee0953846.js"
44
- ],
45
- "/[slug]/p": [
46
- "static/chunks/webpack-f725b61675603493.js",
47
- "static/chunks/framework-dfd14d7ce6600b03.js",
48
- "static/chunks/main-9746772201fe3ac1.js",
49
- "static/chunks/351-a4e28d64f48c5269.js",
50
- "static/chunks/781-e1b538e051ff4c3e.js",
51
- "static/css/4abccf9803c3c356.css",
52
- "static/chunks/pages/[slug]/p-9b24055cb30ee7a8.js"
53
- ],
54
- "/_app": [
55
- "static/chunks/webpack-f725b61675603493.js",
56
- "static/chunks/framework-dfd14d7ce6600b03.js",
57
- "static/chunks/main-9746772201fe3ac1.js",
58
- "static/css/502746c995f64cce.css",
59
- "static/chunks/pages/_app-4aeb21d72aeea9b7.js"
60
- ],
61
- "/_error": [
62
- "static/chunks/webpack-f725b61675603493.js",
63
- "static/chunks/framework-dfd14d7ce6600b03.js",
64
- "static/chunks/main-9746772201fe3ac1.js",
65
- "static/chunks/pages/_error-a7a0c1d9bfbb4f38.js"
66
- ],
67
- "/account": [
68
- "static/chunks/webpack-f725b61675603493.js",
69
- "static/chunks/framework-dfd14d7ce6600b03.js",
70
- "static/chunks/main-9746772201fe3ac1.js",
71
- "static/chunks/351-a4e28d64f48c5269.js",
72
- "static/chunks/pages/account-b8fc5222ffe89b60.js"
73
- ],
74
- "/checkout": [
75
- "static/chunks/webpack-f725b61675603493.js",
76
- "static/chunks/framework-dfd14d7ce6600b03.js",
77
- "static/chunks/main-9746772201fe3ac1.js",
78
- "static/chunks/351-a4e28d64f48c5269.js",
79
- "static/chunks/pages/checkout-f8cb7cb22225ef9d.js"
80
- ],
81
- "/login": [
82
- "static/chunks/webpack-f725b61675603493.js",
83
- "static/chunks/framework-dfd14d7ce6600b03.js",
84
- "static/chunks/main-9746772201fe3ac1.js",
85
- "static/chunks/351-a4e28d64f48c5269.js",
86
- "static/chunks/pages/login-45cc84352bac2408.js"
87
- ],
88
- "/s": [
89
- "static/chunks/webpack-f725b61675603493.js",
90
- "static/chunks/framework-dfd14d7ce6600b03.js",
91
- "static/chunks/main-9746772201fe3ac1.js",
92
- "static/chunks/351-a4e28d64f48c5269.js",
93
- "static/chunks/264-5b07911df63b8601.js",
94
- "static/css/6f4d3e91f1d161a8.css",
95
- "static/chunks/pages/s-ba2868e14fedb65b.js"
96
- ]
97
- },
98
- "ampFirstPages": []
99
- }