@faststore/core 3.0.112 → 3.0.115

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 (94) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +30 -30
  3. package/.next/cache/.tsbuildinfo +1 -1
  4. package/.next/cache/config.json +3 -3
  5. package/.next/cache/eslint/.cache_1gneedd +1 -1
  6. package/.next/cache/webpack/client-production/0.pack +0 -0
  7. package/.next/cache/webpack/client-production/index.pack +0 -0
  8. package/.next/cache/webpack/server-production/0.pack +0 -0
  9. package/.next/cache/webpack/server-production/index.pack +0 -0
  10. package/.next/next-minimal-server.js.nft.json +1 -1
  11. package/.next/next-server.js.nft.json +1 -1
  12. package/.next/prerender-manifest.js +1 -1
  13. package/.next/prerender-manifest.json +1 -1
  14. package/.next/routes-manifest.json +1 -1
  15. package/.next/server/chunks/153.js +1 -1
  16. package/.next/server/chunks/498.js +1 -1
  17. package/.next/server/chunks/646.js +2 -2
  18. package/.next/server/chunks/933.js +1 -1
  19. package/.next/server/chunks/997.js +1 -1
  20. package/.next/server/middleware-build-manifest.js +1 -1
  21. package/.next/server/pages/404.js +1 -1
  22. package/.next/server/pages/404.js.nft.json +1 -1
  23. package/.next/server/pages/500.js +1 -1
  24. package/.next/server/pages/500.js.nft.json +1 -1
  25. package/.next/server/pages/[...slug].js +1 -1
  26. package/.next/server/pages/[...slug].js.nft.json +1 -1
  27. package/.next/server/pages/[slug]/p.js +1 -1
  28. package/.next/server/pages/[slug]/p.js.nft.json +1 -1
  29. package/.next/server/pages/_app.js +1 -1
  30. package/.next/server/pages/_app.js.nft.json +1 -1
  31. package/.next/server/pages/_error.js +1 -1
  32. package/.next/server/pages/_error.js.nft.json +1 -1
  33. package/.next/server/pages/account.js +1 -1
  34. package/.next/server/pages/account.js.nft.json +1 -1
  35. package/.next/server/pages/checkout.js +1 -1
  36. package/.next/server/pages/checkout.js.nft.json +1 -1
  37. package/.next/server/pages/en-US/404.html +1 -68
  38. package/.next/server/pages/en-US/404.json +1 -1
  39. package/.next/server/pages/en-US/500.html +1 -68
  40. package/.next/server/pages/en-US/500.json +1 -1
  41. package/.next/server/pages/en-US/account.html +1 -68
  42. package/.next/server/pages/en-US/account.json +1 -1
  43. package/.next/server/pages/en-US/checkout.html +1 -68
  44. package/.next/server/pages/en-US/checkout.json +1 -1
  45. package/.next/server/pages/en-US/login.html +1 -68
  46. package/.next/server/pages/en-US/login.json +1 -1
  47. package/.next/server/pages/en-US/s.html +1 -68
  48. package/.next/server/pages/en-US/s.json +1 -1
  49. package/.next/server/pages/en-US.html +2 -69
  50. package/.next/server/pages/en-US.json +1 -1
  51. package/.next/server/pages/index.js +1 -1
  52. package/.next/server/pages/index.js.nft.json +1 -1
  53. package/.next/server/pages/login.js +1 -1
  54. package/.next/server/pages/login.js.nft.json +1 -1
  55. package/.next/server/pages/s.js +1 -1
  56. package/.next/server/pages/s.js.nft.json +1 -1
  57. package/.next/server/pages-manifest.json +1 -1
  58. package/.next/static/Phsiu2MTzhG7Yo-7F06VY/_buildManifest.js +1 -0
  59. package/.next/static/chunks/{575-ae1d53677e78fd7b.js → 108-090729aea2c4ba4c.js} +2 -2
  60. package/.next/static/chunks/968-d09ce43a57f43460.js +1 -0
  61. package/.next/static/chunks/pages/{404-88e398da671e9a74.js → 404-3c76e2c43ca8dcd4.js} +1 -1
  62. package/.next/static/chunks/pages/{500-8460c80c5f08bb09.js → 500-1ad030e3adff740a.js} +1 -1
  63. package/.next/static/chunks/pages/[...slug]-71b879bc2fe42f9c.js +1 -0
  64. package/.next/static/chunks/pages/[slug]/{p-08757b2e058d168d.js → p-e34db2401c5476f8.js} +1 -1
  65. package/.next/static/chunks/pages/_app-5d553d859f2f0ef5.js +1 -0
  66. package/.next/static/chunks/pages/{account-2f8be1e9ff489677.js → account-e7b06039b653381d.js} +1 -1
  67. package/.next/static/chunks/pages/{checkout-0b95738bd7217e14.js → checkout-996d898a57d037a0.js} +1 -1
  68. package/.next/static/chunks/pages/index-31ed9b1d5e358000.js +1 -0
  69. package/.next/static/chunks/pages/{login-0f8dfe5bdc54f8cc.js → login-b82e639bfe6d70ce.js} +1 -1
  70. package/.next/static/chunks/pages/{s-b52ba3a76a5e2d94.js → s-42e7637b150b1768.js} +1 -1
  71. package/.next/trace +95 -95
  72. package/.turbo/turbo-build.log +17 -17
  73. package/.turbo/turbo-test.log +4 -4
  74. package/cypress/integration/a11y.test.js +17 -5
  75. package/cypress/integration/analytics.test.js +2 -2
  76. package/cypress/integration/seo.test.js +6 -3
  77. package/faststore.config.default.js +2 -2
  78. package/package.json +4 -6
  79. package/src/components/cms/GlobalSections.tsx +3 -3
  80. package/src/components/cms/RenderSections.tsx +2 -5
  81. package/src/components/common/Footer/Footer.tsx +6 -2
  82. package/src/components/common/Footer/FooterLinks.tsx +1 -1
  83. package/src/components/common/Footer/FooterSocial.tsx +10 -3
  84. package/src/components/sections/Incentives/Incentives.tsx +5 -3
  85. package/src/components/ui/Incentives/Incentives.tsx +11 -5
  86. package/src/components/ui/ProductDetails/ProductDetailsSettings.tsx +1 -2
  87. package/src/pages/_app.tsx +0 -7
  88. package/src/pages/index.tsx +18 -19
  89. package/.next/static/Zw3RRqpKiix9XheiagRJ4/_buildManifest.js +0 -1
  90. package/.next/static/chunks/968-064430c7734aa0e9.js +0 -1
  91. package/.next/static/chunks/pages/[...slug]-8ccbcdddf41a0c95.js +0 -1
  92. package/.next/static/chunks/pages/_app-aeb8a1c6bff23375.js +0 -68
  93. package/.next/static/chunks/pages/index-2ed543569f2d5886.js +0 -1
  94. /package/.next/static/{Zw3RRqpKiix9XheiagRJ4 → Phsiu2MTzhG7Yo-7F06VY}/_ssgManifest.js +0 -0
@@ -37,35 +37,35 @@ https://nextjs.org/telemetry
37
37
  Collecting page data ...
38
38
  Generating static pages (0/7) ...
39
39
 
40
40
  Generating static pages (1/7)
41
- 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.
42
41
 
43
42
  Generating static pages (3/7)
43
+ 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.
44
44
 
45
45
  Generating static pages (5/7)
46
46
 
47
47
  ✓ Generating static pages (7/7)
48
48
  Finalizing page optimization ...
49
49
  Collecting build traces ...
50
50
 
51
51
  Route (pages) Size First Load JS
52
- ┌ ● / 1.26 kB 148 kB
52
+ ┌ ● / 1.27 kB 143 kB
53
53
  ├ └ css/197e314c5a03eabd.css 740 B
54
- ├ /_app 0 B 93.6 kB
55
- ├ ● /[...slug] 2.81 kB 160 kB
54
+ ├ /_app 0 B 90.7 kB
55
+ ├ ● /[...slug] 2.82 kB 155 kB
56
56
  ├ └ css/e47f1a002bdcf76f.css 2.38 kB
57
- ├ ● /[slug]/p 10.8 kB 157 kB
57
+ ├ ● /[slug]/p 10.8 kB 152 kB
58
58
  ├ └ css/fbd711b9f5abf105.css 9.57 kB
59
- ├ ○ /404 1.28 kB 131 kB
60
- ├ ● /500 1.29 kB 131 kB
61
- ├ ● /account 674 B 131 kB
62
- ├ λ /api/graphql 0 B 93.6 kB
63
- ├ λ /api/health/live 0 B 93.6 kB
64
- ├ λ /api/health/ready 0 B 93.6 kB
65
- ├ λ /api/preview 0 B 93.6 kB
66
- ├ ● /checkout 660 B 131 kB
67
- ├ ● /login 1.4 kB 132 kB
68
- └ ● /s 2.25 kB 160 kB
69
- + First Load JS shared by all 96.7 kB
59
+ ├ ○ /404 1.28 kB 126 kB
60
+ ├ ● /500 1.29 kB 126 kB
61
+ ├ ● /account 674 B 126 kB
62
+ ├ λ /api/graphql 0 B 90.7 kB
63
+ ├ λ /api/health/live 0 B 90.7 kB
64
+ ├ λ /api/health/ready 0 B 90.7 kB
65
+ ├ λ /api/preview 0 B 90.7 kB
66
+ ├ ● /checkout 660 B 126 kB
67
+ ├ ● /login 1.4 kB 127 kB
68
+ └ ● /s 2.25 kB 155 kB
69
+ + First Load JS shared by all 93.7 kB
70
70
  ├ chunks/framework-8e279965036b6169.js 45.4 kB
71
71
  ├ chunks/main-029f1328cfee9686.js 33.1 kB
72
- ├ chunks/pages/_app-aeb8a1c6bff23375.js 12.8 kB
72
+ ├ chunks/pages/_app-5d553d859f2f0ef5.js 9.85 kB
73
73
  ├ chunks/webpack-8883d8523b03e385.js 2.38 kB
74
74
  └ css/ee0556daedda6306.css 3.07 kB
75
75
 
@@ -1,10 +1,10 @@
1
1
  $ jest
2
- PASS test/utils/multipleTemplates.test.ts (36.799 s)
3
- PASS test/server/cms/index.test.ts (37.346 s)
4
- PASS test/server/index.test.ts (41.202 s)
2
+ PASS test/utils/multipleTemplates.test.ts (37.085 s)
3
+ PASS test/server/cms/index.test.ts (37.426 s)
4
+ PASS test/server/index.test.ts (40.305 s)
5
5
 
6
6
  Test Suites: 3 passed, 3 total
7
7
  Tests: 19 passed, 19 total
8
8
  Snapshots: 0 total
9
- Time: 42.45 s
9
+ Time: 41.361 s
10
10
  Ran all test suites.
@@ -4,7 +4,6 @@
4
4
  * Cypress tests for a11y (accessibility)
5
5
  */
6
6
 
7
- import { disabledA11yRules } from '../global'
8
7
  import { cypress } from '../../faststore.config'
9
8
 
10
9
  const { pages } = cypress
@@ -22,7 +21,12 @@ describe('Accessibility tests', () => {
22
21
  cy.getById('product-link').should('exist')
23
22
 
24
23
  cy.injectAxe()
25
- cy.checkA11y(null, disabledA11yRules)
24
+
25
+ cy.checkA11y(null, {
26
+ rules: {
27
+ 'aria-allowed-role': { enabled: true },
28
+ },
29
+ })
26
30
  })
27
31
 
28
32
  it('checks a11y for product page', () => {
@@ -30,10 +34,14 @@ describe('Accessibility tests', () => {
30
34
  cy.waitForHydration()
31
35
 
32
36
  // Wait for product to be available and page to be interactive
33
- cy.getById('buy-button').should('exist')
37
+ cy.get('[data-testid="buy-button"]').should('exist')
34
38
 
35
39
  cy.injectAxe()
36
- cy.checkA11y(null, disabledA11yRules)
40
+ cy.checkA11y(null, {
41
+ rules: {
42
+ 'aria-allowed-role': { enabled: true },
43
+ },
44
+ })
37
45
  })
38
46
 
39
47
  it('checks a11y for home page', () => {
@@ -41,6 +49,10 @@ describe('Accessibility tests', () => {
41
49
  cy.waitForHydration()
42
50
 
43
51
  cy.injectAxe()
44
- cy.checkA11y(null, disabledA11yRules)
52
+ cy.checkA11y(null, {
53
+ rules: {
54
+ 'aria-allowed-role': { enabled: true },
55
+ },
56
+ })
45
57
  })
46
58
  })
@@ -4,8 +4,8 @@
4
4
  * Cypress tests for testing the Analytics module
5
5
  */
6
6
 
7
- import { options } from '../global'
8
7
  import { cypress } from '../../faststore.config'
8
+ import { options } from '../global'
9
9
 
10
10
  const { pages } = cypress
11
11
 
@@ -395,7 +395,7 @@ describe('view_cart event', () => {
395
395
  ({ event: eventName }) => eventName === 'view_cart'
396
396
  )
397
397
 
398
- expect(event.ecommerce.value).to.equal(950)
398
+ expect(event.ecommerce.value).to.equal(420)
399
399
  expect(event.ecommerce.items.length).to.equal(1)
400
400
  })
401
401
  })
@@ -6,8 +6,8 @@
6
6
  * TODO: Improve structured data validaton by actually using schema.org's schemas
7
7
  */
8
8
 
9
- import { options } from '../global'
10
9
  import { cypress, storeUrl } from '../../faststore.config'
10
+ import { options } from '../global'
11
11
 
12
12
  const { pages } = cypress
13
13
 
@@ -88,10 +88,13 @@ describe('Product Page Seo', () => {
88
88
  .should(($el) => {
89
89
  expect($el.attr('content')).to.eq('index,follow')
90
90
  })
91
+
91
92
  cy.get('link[rel="canonical"]')
92
93
  .should('exist')
93
- .should(($link) => {
94
- expect($link.attr('href')).to.eq(`${storeUrl}${pages.pdp}`)
94
+ .and(($link) => {
95
+ const href = $link.attr('href')
96
+ const regex = new RegExp(`^${href.split('/')[0]}`)
97
+ expect(`${storeUrl}${pages.pdp}`).to.match(regex)
95
98
  })
96
99
  })
97
100
 
@@ -67,7 +67,7 @@ module.exports = {
67
67
  server: process.env.BASE_SITE_URL || 'http://localhost:3000',
68
68
  pages: {
69
69
  home: '/',
70
- pdp: '/apple-magic-mouse/p',
70
+ pdp: '/4k-philips-monitor-99988213/p',
71
71
  collection: '/office',
72
72
  },
73
73
  },
@@ -76,7 +76,7 @@ module.exports = {
76
76
  cypress: {
77
77
  pages: {
78
78
  home: '/',
79
- pdp: '/apple-magic-mouse/p',
79
+ pdp: '/4k-philips-monitor-99988213/p',
80
80
  collection: '/office',
81
81
  collection_2: '/technology',
82
82
  collection_filtered:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/core",
3
- "version": "3.0.112",
3
+ "version": "3.0.115",
4
4
  "license": "MIT",
5
5
  "repository": "vtex/faststore",
6
6
  "browserslist": "supports es6-module and not dead",
@@ -44,11 +44,11 @@
44
44
  "@envelop/parser-cache": "^2.2.0",
45
45
  "@envelop/validation-cache": "^2.2.0",
46
46
  "@faststore/api": "^3.0.110",
47
- "@faststore/components": "^3.0.110",
47
+ "@faststore/components": "^3.0.115",
48
48
  "@faststore/graphql-utils": "^3.0.110",
49
49
  "@faststore/lighthouse": "^3.0.110",
50
50
  "@faststore/sdk": "^3.0.110",
51
- "@faststore/ui": "^3.0.110",
51
+ "@faststore/ui": "^3.0.115",
52
52
  "@graphql-codegen/cli": "^5.0.2",
53
53
  "@graphql-codegen/client-preset": "^4.2.6",
54
54
  "@graphql-codegen/typescript": "^4.0.7",
@@ -63,7 +63,6 @@
63
63
  "@vtex/client-cms": "^0.2.12",
64
64
  "@vtex/prettier-config": "1.0.0",
65
65
  "autoprefixer": "^10.4.0",
66
- "chalk": "^5.2.0",
67
66
  "css-loader": "^6.7.1",
68
67
  "deepmerge": "^4.3.1",
69
68
  "draftjs-to-html": "^0.9.1",
@@ -72,7 +71,6 @@
72
71
  "include-media": "^1.4.10",
73
72
  "next": "^13.5.6",
74
73
  "next-seo": "^6.4.0",
75
- "nextjs-progressbar": "^0.0.14",
76
74
  "postcss": "^8.4.4",
77
75
  "prettier": "^2.2.0",
78
76
  "react": "^18.2.0",
@@ -130,5 +128,5 @@
130
128
  "node": "18.19.0",
131
129
  "yarn": "1.19.1"
132
130
  },
133
- "gitHead": "e2326e5b2410854590d3153af4011080e034ef44"
131
+ "gitHead": "1cc987d52dfce0b3235e80662099a55c7acb9ba9"
134
132
  }
@@ -56,7 +56,7 @@ export const getGlobalSectionsData = async (
56
56
  const page = cmsData[GLOBAL_SECTIONS_CONTENT_TYPE][0]
57
57
 
58
58
  if (page) {
59
- const pageData = await getPage<PageContentType>({
59
+ const pageData = getPage<PageContentType>({
60
60
  contentType: GLOBAL_SECTIONS_CONTENT_TYPE,
61
61
  documentId: page.documentId,
62
62
  versionId: page.versionId,
@@ -66,11 +66,11 @@ export const getGlobalSectionsData = async (
66
66
  }
67
67
  }
68
68
 
69
- const { sections } = await getPage<PageContentType>({
69
+ const pageData = getPage<PageContentType>({
70
70
  ...(previewData?.contentType === GLOBAL_SECTIONS_CONTENT_TYPE &&
71
71
  previewData),
72
72
  contentType: GLOBAL_SECTIONS_CONTENT_TYPE,
73
73
  })
74
74
 
75
- return { sections }
75
+ return pageData
76
76
  }
@@ -1,4 +1,3 @@
1
- import chalk from 'chalk'
2
1
  import { ComponentType, PropsWithChildren, memo, useMemo } from 'react'
3
2
 
4
3
  import SectionBoundary from './SectionBoundary'
@@ -30,10 +29,8 @@ const RenderSectionsBase = ({ sections = [], components }: Props) => {
30
29
 
31
30
  if (!Component) {
32
31
  // TODO: add a documentation link to help to do this
33
- console.info(
34
- `${chalk.yellow(
35
- 'warn'
36
- )} - ${name} not found. Add a new component for this section or remove it from the CMS`
32
+ console.warn(
33
+ `${name} not found. Add a new component for this section or remove it from the CMS`
37
34
  )
38
35
 
39
36
  return null
@@ -6,11 +6,15 @@ interface FooterProps {
6
6
  }
7
7
 
8
8
  export function FooterInfo({ children }: FooterProps) {
9
- return <div data-fs-footer-info>{children}</div>
9
+ return (
10
+ <section data-fs-footer-info aria-label="Footer Information">
11
+ {children}
12
+ </section>
13
+ )
10
14
  }
11
15
 
12
16
  export function FooterNavigation({ children }: FooterProps) {
13
- return <div data-fs-footer-navigation>{children}</div>
17
+ return <section data-fs-footer-navigation>{children}</section>
14
18
  }
15
19
 
16
20
  export function Footer({ children }: FooterProps) {
@@ -67,7 +67,7 @@ function FooterLinks({ links }: FooterLinksProps) {
67
67
  </div>
68
68
 
69
69
  <div className="hidden-mobile">
70
- <nav data-fs-footer-links-columns>
70
+ <nav data-fs-footer-links-columns aria-label="Footer Links Navigation">
71
71
  {links.map(({ sectionTitle, items }) => (
72
72
  <div key={sectionTitle}>
73
73
  <p data-fs-footer-links-title>{sectionTitle}</p>
@@ -13,12 +13,19 @@ type FooterSocialLink = {
13
13
  export interface FooterSocialProps {
14
14
  title: string
15
15
  links: FooterSocialLink[]
16
+ id?: string
16
17
  }
17
18
 
18
- function FooterSocial({ title, links }: FooterSocialProps) {
19
+ function FooterSocial({
20
+ title,
21
+ links,
22
+ id = 'footer-social-title',
23
+ }: FooterSocialProps) {
19
24
  return (
20
- <section data-fs-footer-social>
21
- <p data-fs-footer-social-title>{title}</p>
25
+ <section data-fs-footer-social aria-labelledby={id}>
26
+ <p data-fs-footer-social-title id={id}>
27
+ {title}
28
+ </p>
22
29
  <UIList>
23
30
  {links.map(({ icon: { icon }, url }) => (
24
31
  <li key={icon}>
@@ -1,17 +1,19 @@
1
- import UIIncentives from 'src/components/ui/Incentives/Incentives'
2
1
  import type { Incentive } from 'src/components/ui/Incentives'
2
+ import UIIncentives from 'src/components/ui/Incentives/Incentives'
3
3
 
4
4
  import Section from '../Section'
5
5
  import styles from './section.module.scss'
6
6
 
7
7
  interface Props {
8
8
  incentives: Incentive[]
9
+ label?: string
9
10
  }
10
11
 
11
- function Incentives({ incentives }: Props) {
12
+ function Incentives({ incentives, label }: Props) {
12
13
  return (
13
14
  <Section className={`${styles.section} section-incentives layout__section`}>
14
- <UIIncentives incentives={incentives} colored />
15
+ {/* Leaving label as an empty string isn’t ideal, but it works for now. Ideally, we should receive a label from the CMS to identify which Incentive section we’re referring to. */}
16
+ <UIIncentives incentives={incentives} colored label={label ?? ''} />
15
17
  </Section>
16
18
  )
17
19
  }
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Icon as UIIcon,
3
- List as UIList,
4
3
  Incentive as UIIncentive,
4
+ List as UIList,
5
5
  } from '@faststore/ui'
6
6
 
7
7
  export type Incentive = {
@@ -22,18 +22,24 @@ export interface IncentivesProps {
22
22
  * Controls the component's direction.
23
23
  */
24
24
  variant?: 'horizontal' | 'vertical'
25
+ /**
26
+ * Label to identify the incentive list and offer better accessibility
27
+ */
28
+ label?: string
25
29
  }
26
30
 
27
31
  function Incentives({
28
32
  incentives,
29
33
  variant = 'horizontal',
30
34
  colored = false,
35
+ label,
31
36
  }: IncentivesProps) {
32
37
  return (
33
- <div
38
+ <section
34
39
  data-fs-incentives
35
40
  data-fs-incentives-colored={colored}
36
41
  data-fs-incentives-variant={variant}
42
+ aria-label={`Incentives List ${label}`}
37
43
  >
38
44
  <UIList data-fs-content="incentives">
39
45
  {incentives.map((incentive, index) => (
@@ -46,7 +52,7 @@ function Incentives({
46
52
  width={32}
47
53
  height={32}
48
54
  />
49
- <div data-fs-incentive-content>
55
+ <section data-fs-incentive-content>
50
56
  <p data-fs-incentive-title>{incentive.title}</p>
51
57
  <span data-fs-incentive-description>
52
58
  {incentive.firstLineText}
@@ -56,12 +62,12 @@ function Incentives({
56
62
  {incentive.secondLineText}
57
63
  </span>
58
64
  )}
59
- </div>
65
+ </section>
60
66
  </UIIncentive>
61
67
  </li>
62
68
  ))}
63
69
  </UIList>
64
- </div>
70
+ </section>
65
71
  )
66
72
  }
67
73
 
@@ -9,9 +9,8 @@ import { useFormattedPrice } from 'src/sdk/product/useFormattedPrice'
9
9
  import Selectors from 'src/components/ui/SkuSelector'
10
10
  import AddToCartLoadingSkeleton from './AddToCartLoadingSkeleton'
11
11
 
12
- import { Icon as UIIcon, useUI } from '@faststore/ui'
12
+ import { Icon as UIIcon, Label as UILabel, useUI } from '@faststore/ui'
13
13
  import { useOverrideComponents } from 'src/sdk/overrides/OverrideContext'
14
- import { Label as UILabel } from '@faststore/ui'
15
14
 
16
15
  interface ProductDetailsSettingsProps {
17
16
  product: ProductDetailsFragment_ProductFragment
@@ -1,6 +1,5 @@
1
1
  import { UIProvider } from '@faststore/ui'
2
2
  import type { AppProps } from 'next/app'
3
- import NextNProgress from 'nextjs-progressbar'
4
3
  import Layout from 'src/Layout'
5
4
  import AnalyticsHandler from 'src/sdk/analytics'
6
5
  import ErrorBoundary from 'src/sdk/error/ErrorBoundary'
@@ -15,12 +14,6 @@ import { DefaultSeo } from 'next-seo'
15
14
  function App({ Component, pageProps }: AppProps) {
16
15
  return (
17
16
  <ErrorBoundary>
18
- <NextNProgress
19
- color="var(--fs-color-primary-bkg);"
20
- showOnShallow={false}
21
- options={{ showSpinner: false }}
22
- />
23
-
24
17
  <DefaultSeo {...SEO} />
25
18
 
26
19
  <AnalyticsHandler />
@@ -100,30 +100,29 @@ export const getStaticProps: GetStaticProps<
100
100
  Record<string, string>,
101
101
  Locator
102
102
  > = async ({ previewData }) => {
103
- const serverData = await getDynamicContent({ pageType: 'home' })
104
- const globalSections = await getGlobalSectionsData(previewData)
103
+ const globalSectionsPromise = getGlobalSectionsData(previewData)
104
+ const serverDataPromise = getDynamicContent({ pageType: 'home' })
105
105
 
106
+ let cmsPage = null
106
107
  if (storeConfig.cms.data) {
107
108
  const cmsData = JSON.parse(storeConfig.cms.data)
108
- const page = cmsData['home'][0]
109
-
110
- if (page) {
111
- const pageData = await getPage<PageContentType>({
109
+ cmsPage = cmsData['home'][0]
110
+ }
111
+ const pagePromise = cmsPage
112
+ ? getPage<PageContentType>({
112
113
  contentType: 'home',
113
- documentId: page.documentId,
114
- versionId: page.versionId,
114
+ documentId: cmsPage.documentId,
115
+ versionId: cmsPage.versionId,
115
116
  })
116
-
117
- return {
118
- props: { page: pageData, globalSections, serverData },
119
- }
120
- }
121
- }
122
-
123
- const page = await getPage<PageContentType>({
124
- ...(previewData?.contentType === 'home' && previewData),
125
- contentType: 'home',
126
- })
117
+ : getPage<PageContentType>({
118
+ ...(previewData?.contentType === 'home' && previewData),
119
+ contentType: 'home',
120
+ })
121
+ const [page, globalSections, serverData] = await Promise.all([
122
+ pagePromise,
123
+ globalSectionsPromise,
124
+ serverDataPromise,
125
+ ])
127
126
 
128
127
  return {
129
128
  props: { page, globalSections, serverData },
@@ -1 +0,0 @@
1
- self.__BUILD_MANIFEST=function(s,c,a,t,e,f,d,i){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/":[s,c,a,t,e,"static/css/197e314c5a03eabd.css","static/chunks/pages/index-2ed543569f2d5886.js"],"/404":[s,c,a,f,"static/chunks/pages/404-88e398da671e9a74.js"],"/500":[s,c,a,f,"static/chunks/pages/500-8460c80c5f08bb09.js"],"/_error":["static/chunks/pages/_error-fbf331a03642b495.js"],"/account":[s,c,a,"static/chunks/pages/account-2f8be1e9ff489677.js"],"/checkout":[s,c,a,"static/chunks/pages/checkout-0b95738bd7217e14.js"],"/login":[s,c,a,f,"static/chunks/pages/login-0f8dfe5bdc54f8cc.js"],"/s":[s,c,a,t,e,d,i,f,"static/chunks/pages/s-b52ba3a76a5e2d94.js"],"/[slug]/p":[s,c,a,t,e,"static/css/fbd711b9f5abf105.css","static/chunks/pages/[slug]/p-08757b2e058d168d.js"],"/[...slug]":[s,c,a,t,e,d,i,"static/css/e47f1a002bdcf76f.css","static/chunks/pages/[...slug]-8ccbcdddf41a0c95.js"],sortedPages:["/","/404","/500","/_app","/_error","/account","/checkout","/login","/s","/[slug]/p","/[...slug]"]}}("static/chunks/575-ae1d53677e78fd7b.js","static/css/4fae3c7fc719f5c5.css","static/chunks/968-064430c7734aa0e9.js","static/css/3e19bc8739388691.css","static/chunks/661-37d224da8cd18a0d.js","static/css/2980acad3f8e1028.css","static/css/c725ca9e956e11d7.css","static/chunks/629-2035a739f8a77882.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();