@faststore/core 0.3.9 → 0.3.10
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/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Conventional Changelog](https://github.com/conventional-changelog/conventional-changelog),
|
|
6
6
|
and this project adheres to [Calendar Versioning](https://calver.org/).
|
|
7
7
|
|
|
8
|
+
### [0.3.10](https://github.com/vtex-sites/nextjs.store/compare/0.3.9...0.3.10) (2022-12-19)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* custom components on home page ([#325](https://github.com/vtex-sites/nextjs.store/issues/325)) ([c7fbdec](https://github.com/vtex-sites/nextjs.store/commit/c7fbdecd9c2730d4f474444ee086a7099fa2843f)), closes [#326](https://github.com/vtex-sites/nextjs.store/issues/326)
|
|
14
|
+
|
|
8
15
|
### [0.3.9](https://github.com/vtex-sites/nextjs.store/compare/0.3.8...0.3.9) (2022-12-16)
|
|
9
16
|
|
|
10
17
|
|
package/package.json
CHANGED
|
File without changes
|
package/src/pages/[slug]/p.tsx
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { isNotFoundError } from '@faststore/api'
|
|
2
2
|
import { gql } from '@faststore/graphql-utils'
|
|
3
|
-
import {
|
|
3
|
+
import type { Locator } from '@vtex/client-cms'
|
|
4
4
|
import type { GetStaticPaths, GetStaticProps } from 'next'
|
|
5
|
+
import { BreadcrumbJsonLd, NextSeo, ProductJsonLd } from 'next-seo'
|
|
5
6
|
import type { ComponentType } from 'react'
|
|
6
|
-
import type { Locator } from '@vtex/client-cms'
|
|
7
7
|
|
|
8
|
+
import type {
|
|
9
|
+
ServerProductPageQueryQuery,
|
|
10
|
+
ServerProductPageQueryQueryVariables,
|
|
11
|
+
} from '@generated/graphql'
|
|
8
12
|
import RenderPageSections from 'src/components/cms/RenderPageSections'
|
|
9
13
|
import BannerNewsletter from 'src/components/sections/BannerNewsletter/BannerNewsletter'
|
|
10
14
|
import CrossSellingShelf from 'src/components/sections/CrossSellingShelf'
|
|
11
15
|
import ProductDetails from 'src/components/sections/ProductDetails'
|
|
16
|
+
import CUSTOM_COMPONENTS from 'src/customizations/components'
|
|
12
17
|
import { useSession } from 'src/sdk/session'
|
|
13
18
|
import { mark } from 'src/sdk/tests/mark'
|
|
14
19
|
import { execute } from 'src/server'
|
|
15
|
-
import { getPage } from 'src/server/cms'
|
|
16
20
|
import type { PDPContentType } from 'src/server/cms'
|
|
17
|
-
import
|
|
18
|
-
import type {
|
|
19
|
-
ServerProductPageQueryQuery,
|
|
20
|
-
ServerProductPageQueryQueryVariables,
|
|
21
|
-
} from '@generated/graphql'
|
|
21
|
+
import { getPage } from 'src/server/cms'
|
|
22
22
|
|
|
23
23
|
import storeConfig from '../../../store.config'
|
|
24
24
|
|
|
@@ -30,7 +30,7 @@ const COMPONENTS: Record<string, ComponentType<any>> = {
|
|
|
30
30
|
ProductDetails,
|
|
31
31
|
BannerNewsletter,
|
|
32
32
|
CrossSellingShelf,
|
|
33
|
-
...
|
|
33
|
+
...CUSTOM_COMPONENTS,
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
type Props = ServerProductPageQueryQuery & PDPContentType
|
package/src/pages/index.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { Locator } from '@vtex/client-cms'
|
|
2
|
+
import type { GetStaticProps } from 'next'
|
|
1
3
|
import { NextSeo, SiteLinksSearchBoxJsonLd } from 'next-seo'
|
|
2
4
|
import type { ComponentType } from 'react'
|
|
3
|
-
import type { GetStaticProps } from 'next'
|
|
4
|
-
import type { Locator } from '@vtex/client-cms'
|
|
5
5
|
|
|
6
6
|
import RenderPageSections from 'src/components/cms/RenderPageSections'
|
|
7
7
|
import BannerText from 'src/components/sections/BannerText'
|
|
@@ -10,17 +10,14 @@ import IncentivesHeader from 'src/components/sections/Incentives/IncentivesHeade
|
|
|
10
10
|
import Newsletter from 'src/components/sections/Newsletter'
|
|
11
11
|
import ProductShelf from 'src/components/sections/ProductShelf'
|
|
12
12
|
import ProductTiles from 'src/components/sections/ProductTiles'
|
|
13
|
+
import CUSTOM_COMPONENTS from 'src/customizations/components'
|
|
13
14
|
import { mark } from 'src/sdk/tests/mark'
|
|
14
|
-
import { getPage } from 'src/server/cms'
|
|
15
15
|
import type { PageContentType } from 'src/server/cms'
|
|
16
|
-
import
|
|
16
|
+
import { getPage } from 'src/server/cms'
|
|
17
17
|
|
|
18
18
|
import storeConfig from '../../store.config'
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
* Sections: Components imported from each store's custom components and '../components/sections'.
|
|
22
|
-
* Do not import or render components from any other folder in here.
|
|
23
|
-
*/
|
|
20
|
+
/* A list of components that can be used in the CMS. */
|
|
24
21
|
const COMPONENTS: Record<string, ComponentType<any>> = {
|
|
25
22
|
Hero,
|
|
26
23
|
BannerText,
|
|
@@ -28,7 +25,7 @@ const COMPONENTS: Record<string, ComponentType<any>> = {
|
|
|
28
25
|
ProductShelf,
|
|
29
26
|
ProductTiles,
|
|
30
27
|
Newsletter,
|
|
31
|
-
...
|
|
28
|
+
...CUSTOM_COMPONENTS,
|
|
32
29
|
}
|
|
33
30
|
|
|
34
31
|
type Props = PageContentType
|