@newskit-render/core 1.27.2 → 1.29.1

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
@@ -3,6 +3,93 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.29.1](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.29.0...@newskit-render/core@1.29.1) (2022-03-01)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **PPDSR-667:** make theme selector overridable ([#610](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/610)) ([4017c6b](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/4017c6baf796dbad2727712d60b9719fb190efcb))
12
+
13
+
14
+
15
+
16
+
17
+ # [1.29.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.28.0...@newskit-render/core@1.29.0) (2022-02-28)
18
+
19
+
20
+ ### Features
21
+
22
+ * **PPDSR-474:** intergate new MAIN Zuora mutation ([#604](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/604)) ([bf62a52](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/bf62a5270f5d5d0236e67222db81697f5e74cd01))
23
+
24
+
25
+
26
+
27
+
28
+ # [1.28.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.27.8...@newskit-render/core@1.28.0) (2022-02-25)
29
+
30
+
31
+ ### Features
32
+
33
+ * **PPDSR-542:** sitemap add support for custom urls ([#601](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/601)) ([dd51e1f](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/dd51e1ff4404b44ba64381f987551f4f88da9b8f))
34
+
35
+
36
+
37
+
38
+
39
+ ## [1.27.8](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.27.7...@newskit-render/core@1.27.8) (2022-02-25)
40
+
41
+ **Note:** Version bump only for package @newskit-render/core
42
+
43
+
44
+
45
+
46
+
47
+ ## [1.27.7](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.27.6...@newskit-render/core@1.27.7) (2022-02-25)
48
+
49
+ **Note:** Version bump only for package @newskit-render/core
50
+
51
+
52
+
53
+
54
+
55
+ ## [1.27.6](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.27.5...@newskit-render/core@1.27.6) (2022-02-24)
56
+
57
+ **Note:** Version bump only for package @newskit-render/core
58
+
59
+
60
+
61
+
62
+
63
+ ## [1.27.5](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.27.4...@newskit-render/core@1.27.5) (2022-02-23)
64
+
65
+
66
+ ### Bug Fixes
67
+
68
+ * **PPDSR-690:** update version to fix pipeline ([#605](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/605)) ([16ae9b5](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/16ae9b57c726899d3138e3112fb36571a6b01e77))
69
+
70
+
71
+
72
+
73
+
74
+ ## [1.27.4](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.27.3...@newskit-render/core@1.27.4) (2022-02-23)
75
+
76
+ **Note:** Version bump only for package @newskit-render/core
77
+
78
+
79
+
80
+
81
+
82
+ ## [1.27.3](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.27.2...@newskit-render/core@1.27.3) (2022-02-21)
83
+
84
+
85
+ ### Bug Fixes
86
+
87
+ * **PPDSR-674:** Footer menu not horizontal on large screens ([#596](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/596)) ([904927d](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/904927d938227514b18cc35a2535b9eed349a61f))
88
+
89
+
90
+
91
+
92
+
6
93
  ## [1.27.2](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.27.1...@newskit-render/core@1.27.2) (2022-02-18)
7
94
 
8
95
  **Note:** Version bump only for package @newskit-render/core
@@ -160,29 +160,38 @@ describe('My account personal details', () => {
160
160
  // )
161
161
  // })
162
162
 
163
- // it('Should go to edit page and change password', () => {
164
- // cy.get('a[href="/account/edit/password"]')
165
- // .should('be.visible')
166
- // .click({ force: true })
163
+ it('Should go to edit page and change password', () => {
164
+ cy.get('a[href="/account/edit/password"]')
165
+ .should('be.visible')
166
+ .click({ force: true })
167
167
 
168
- // cy.get('[data-testid="primary-button"]').should('have.text', 'Send link')
169
- // cy.get('[data-testid="primary-button"]').scrollIntoView().click()
168
+ cy.get('[data-testid="primary-button"]').should('have.text', 'Send link')
169
+ cy.get('[data-testid="primary-button"]').scrollIntoView().click()
170
170
 
171
- // cy.get('[data-testid="primary-button"]').should('not.exist')
171
+ cy.get('[data-testid="primary-button"]').should('not.exist')
172
+ cy.get('a[href="/account/edit/password"]')
173
+ .should('be.visible')
174
+ .click({ force: true })
175
+ cy.get('[data-testid="inline-message"]')
176
+ .children()
177
+ .should(
178
+ 'contain',
179
+ 'Email sent to temp.account@tempaccount.com with a password reset link. If you haven’t received it in a couple of minutes, you may request a new link by clicking on the button below.'
180
+ )
181
+ })
172
182
 
173
- // cy.get('a[href="/account/edit/password"]')
174
- // .should('be.visible')
175
- // .click({ force: true })
183
+ it('Should show success toast', () => {
184
+ cy.get('a[href="/account/edit/password"]')
185
+ .should('be.visible')
186
+ .click({ force: true })
176
187
 
177
- // cy.get('[data-testid="inline-message"]')
178
- // .children()
179
- // .should(
180
- // 'contain',
181
- // `Email sent to ${Cypress.env(
182
- // 'newEmail'
183
- // )} with a password reset link. If you haven’t received it in a couple of minutes, you may request a new link by clicking on the button below.`
184
- // )
185
- // })
188
+ cy.get('[data-testid="primary-button"]').should('have.text', 'Send link')
189
+ cy.get('[data-testid="primary-button"]').scrollIntoView().click()
190
+ cy.contains(
191
+ '[data-testid="toast-container"]',
192
+ 'Email sent with a password reset link'
193
+ )
194
+ })
186
195
 
187
196
  it('Should go to edit page and change landline', () => {
188
197
  cy.get('a[href="/account/edit/landline"]')
@@ -1,42 +1,42 @@
1
- describe('My account Payment page', () => {
2
- beforeEach(() => {
3
- cy.mockConsentAndVisit('/account/payment')
4
- })
1
+ // describe('My account Payment page', () => {
2
+ // beforeEach(() => {
3
+ // cy.mockConsentAndVisit('/account/payment')
4
+ // })
5
5
 
6
- it('should load the zuora iFrame', () => {
7
- cy.get('iframe').should('exist')
8
- })
6
+ // it('should load the zuora iFrame', () => {
7
+ // cy.get('iframe').should('exist')
8
+ // })
9
9
 
10
- it('should successully send the form', () => {
11
- if (Cypress.config('chromeWebSecurity')) {
12
- throw new Error(
13
- 'To get Zuora element `chromeWebSecurity` must be disabled'
14
- )
15
- }
10
+ // it('should successully send the form', () => {
11
+ // if (Cypress.config('chromeWebSecurity')) {
12
+ // throw new Error(
13
+ // 'To get Zuora element `chromeWebSecurity` must be disabled'
14
+ // )
15
+ // }
16
16
 
17
- cy.get('iframe').should('exist')
18
- cy.getZuoraElement('input[name="field_creditCardHolderName"]').type(
19
- 'Gabriel Dimitrov'
20
- )
21
- cy.getZuoraElement('input[name="field_creditCardNumber"]').type(
22
- '4111 1111 1111 1111'
23
- )
24
- cy.getZuoraElement('input[name="field_cardSecurityCode"]').type('123')
25
- cy.getZuoraElement('input[name="field_creditCardPostalCode"]').type(
26
- 'E11 9HB'
27
- )
17
+ // cy.get('iframe').should('exist')
18
+ // cy.getZuoraElement('input[name="field_creditCardHolderName"]').type(
19
+ // 'Gabriel Dimitrov'
20
+ // )
21
+ // cy.getZuoraElement('input[name="field_creditCardNumber"]').type(
22
+ // '4111 1111 1111 1111'
23
+ // )
24
+ // cy.getZuoraElement('input[name="field_cardSecurityCode"]').type('123')
25
+ // cy.getZuoraElement('input[name="field_creditCardPostalCode"]').type(
26
+ // 'E11 9HB'
27
+ // )
28
28
 
29
- cy.getZuoraElement('select[name="field_creditCardExpirationMonth"]').select(
30
- '11'
31
- )
32
- cy.getZuoraElement('select[name="field_creditCardExpirationYear"]').select(
33
- '2026'
34
- )
35
- cy.getZuoraElement('#submitButton').click()
29
+ // cy.getZuoraElement('select[name="field_creditCardExpirationMonth"]').select(
30
+ // '11'
31
+ // )
32
+ // cy.getZuoraElement('select[name="field_creditCardExpirationYear"]').select(
33
+ // '2026'
34
+ // )
35
+ // cy.getZuoraElement('#submitButton').click()
36
36
 
37
- cy.contains(
38
- '[data-testid="toast-container"]',
39
- 'Your payment method has been updated'
40
- )
41
- })
42
- })
37
+ // cy.contains(
38
+ // '[data-testid="toast-container"]',
39
+ // 'Your payment method has been updated'
40
+ // )
41
+ // })
42
+ // })
@@ -0,0 +1,34 @@
1
+ import { createThemeDropdownObject } from '../createThemeDropdownObject'
2
+
3
+ describe('createThemeDropdownObject', () => {
4
+ const setTheme = jest.fn()
5
+ test('should return themeDropdownObject', () => {
6
+ const themeDropdownObject = createThemeDropdownObject(setTheme)
7
+ expect(themeDropdownObject).toEqual({
8
+ setTheme,
9
+ clientHeaderImages: {
10
+ 'The-Sun': 'display-personalDetails-header-sun.svg',
11
+ 'Virgin-Radio': 'display-personalDetails-header-vr.svg',
12
+ 'The-Times': 'display-personalDetails-header-times.svg',
13
+ },
14
+ clientNavigationLogos: {
15
+ 'The-Sun': {
16
+ src: 'navigationPrimary-brandMark-sun.svg',
17
+ width: '115px',
18
+ top: '0',
19
+ },
20
+ 'Virgin-Radio': {
21
+ src: 'navigationPrimary-brandMark-vr.svg',
22
+ width: '150px',
23
+ top: '0',
24
+ },
25
+ 'The-Times': {
26
+ src: 'navigationPrimary-brandMark-times.svg',
27
+ width: '150px',
28
+ top: '0',
29
+ },
30
+ },
31
+ options: expect.any(Object),
32
+ })
33
+ })
34
+ })
@@ -0,0 +1,49 @@
1
+ import { UncompiledTheme } from 'newskit'
2
+ import {
3
+ sharedTheme,
4
+ timesTheme,
5
+ virginRadioTheme,
6
+ theSunTheme,
7
+ ThemeDropdownObject,
8
+ } from '@newskit-render/shared-components'
9
+
10
+ const clientHeaderImages = {
11
+ 'The-Sun': 'display-personalDetails-header-sun.svg',
12
+ 'Virgin-Radio': 'display-personalDetails-header-vr.svg',
13
+ 'The-Times': 'display-personalDetails-header-times.svg',
14
+ }
15
+
16
+ const clientNavigationLogos = {
17
+ 'The-Sun': {
18
+ src: 'navigationPrimary-brandMark-sun.svg',
19
+ width: '115px',
20
+ top: '0',
21
+ },
22
+ 'Virgin-Radio': {
23
+ src: 'navigationPrimary-brandMark-vr.svg',
24
+ width: '150px',
25
+ top: '0',
26
+ },
27
+ 'The-Times': {
28
+ src: 'navigationPrimary-brandMark-times.svg',
29
+ width: '150px',
30
+ top: '0',
31
+ },
32
+ }
33
+
34
+ export const createThemeDropdownObject = (
35
+ setTheme: (T: UncompiledTheme) => void
36
+ ): ThemeDropdownObject => {
37
+ const themeDropdownObject = {
38
+ setTheme,
39
+ clientHeaderImages,
40
+ clientNavigationLogos,
41
+ options: {
42
+ sharedTheme,
43
+ timesTheme,
44
+ virginRadioTheme,
45
+ theSunTheme,
46
+ },
47
+ }
48
+ return themeDropdownObject
49
+ }
@@ -259,6 +259,8 @@ orbs:
259
259
  echo 'export HELM_OPT_SET="$HELM_OPT_SET --set secret.items.SN_PASSWORD=${SN_PASSWORD}"' >> $BASH_ENV
260
260
  echo 'export HELM_OPT_SET="$HELM_OPT_SET --set secret.items.SN_USERNAME=${SN_USERNAME}"' >> $BASH_ENV
261
261
  echo 'export HELM_OPT_SET="$HELM_OPT_SET --set secret.items.SN_ENVIRONMENT=${SN_ENVIRONMENT}"' >> $BASH_ENV
262
+ echo 'export HELM_OPT_SET="$HELM_OPT_SET --set secret.items.ZUORA_RSA_SIGNATURE_URI=${ZUORA_RSA_SIGNATURE_URI}"' >> $BASH_ENV
263
+ echo 'export HELM_OPT_SET="$HELM_OPT_SET --set secret.items.OPTIMIZELY_SDK_KEY=${OPTIMIZELY_SDK_KEY}"' >> $BASH_ENV
262
264
  echo 'export HELM_PATH="helm"' >> $BASH_ENV
263
265
  echo 'export HELM_VALUES="--values $HELM_PATH/values-$HELM_VAL_ENV.yaml"' >> $BASH_ENV
264
266
  echo 'export HELM_INSTALL="helm install --atomic $HELM_VALUES $HELM_OPT_SET $HELM_OPT_NAMESPACE"' >> $BASH_ENV
@@ -10,6 +10,7 @@ envs:
10
10
  NEWSKIT_API_ENV_URL: 'https://newskit.dev.newsapis.co.uk/graphql'
11
11
  SITE_HOST: ''
12
12
  PUBLISHER: ''
13
+ TITLE: ''
13
14
  SITEMAP_PUBLICATION_NAME: ''
14
15
  SITEMAP_FIRST_PUBLICATION_DATE: ''
15
16
  TWITTER_USERNAME: ''
@@ -10,6 +10,7 @@ envs:
10
10
  NEWSKIT_API_ENV_URL: 'https://newskit.dev.newsapis.co.uk/graphql'
11
11
  SITE_HOST: ''
12
12
  PUBLISHER: ''
13
+ TITLE: ''
13
14
  SITEMAP_PUBLICATION_NAME: ''
14
15
  SITEMAP_FIRST_PUBLICATION_DATE: ''
15
16
  TWITTER_USERNAME: ''
@@ -10,6 +10,7 @@ envs:
10
10
  NEWSKIT_API_ENV_URL: 'https://newskit.newsapis.co.uk/graphql'
11
11
  SITE_HOST: ''
12
12
  PUBLISHER: ''
13
+ TITLE: ''
13
14
  SITEMAP_PUBLICATION_NAME: ''
14
15
  SITEMAP_FIRST_PUBLICATION_DATE: ''
15
16
  TWITTER_USERNAME: ''
@@ -10,6 +10,7 @@ envs:
10
10
  NEWSKIT_API_ENV_URL: 'https://newskit.staging.newsapis.co.uk/graphql'
11
11
  SITE_HOST: ''
12
12
  PUBLISHER: ''
13
+ TITLE: ''
13
14
  SITEMAP_PUBLICATION_NAME: ''
14
15
  SITEMAP_FIRST_PUBLICATION_DATE: ''
15
16
  TWITTER_USERNAME: ''
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newskit-render/core",
3
- "version": "1.27.2",
3
+ "version": "1.29.1",
4
4
  "description": "Newskit Render - Core package",
5
5
  "author": "",
6
6
  "license": "UNLICENSED",
@@ -33,14 +33,14 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@apollo/client": "3.4.16",
36
- "@newskit-render/api": "^0.14.1",
37
- "@newskit-render/auth": "^0.28.1",
38
- "@newskit-render/checkout": "^0.23.1",
39
- "@newskit-render/feature-flags": "^0.10.1",
40
- "@newskit-render/my-account": "^0.138.1",
41
- "@newskit-render/shared-components": "^0.35.1",
42
- "@newskit-render/sitemap": "^0.34.1",
43
- "@newskit-render/validation": "^0.34.1",
36
+ "@newskit-render/api": "^0.15.0",
37
+ "@newskit-render/auth": "^0.29.0",
38
+ "@newskit-render/checkout": "^0.24.1",
39
+ "@newskit-render/feature-flags": "^0.11.0",
40
+ "@newskit-render/my-account": "^0.142.1",
41
+ "@newskit-render/shared-components": "^0.37.1",
42
+ "@newskit-render/sitemap": "^0.35.0",
43
+ "@newskit-render/validation": "^0.36.0",
44
44
  "cross-fetch": "3.1.5",
45
45
  "graphql": "15.6.0",
46
46
  "newrelic": "7.1.0",
@@ -2,10 +2,18 @@ import React, { useContext } from 'react'
2
2
  import { Cancellation, getProviderProps } from '@newskit-render/my-account'
3
3
  import newrelic from 'newrelic'
4
4
  import { AppContext } from '../../../app-context/AppContext'
5
+ import { createThemeDropdownObject } from '../../../helpers/createThemeDropdownObject'
5
6
 
6
7
  const AccountCancellation = (props) => {
7
8
  const { theme, setTheme } = useContext(AppContext)
8
- return <Cancellation {...props} customTheme={theme} setTheme={setTheme} />
9
+ const themeDropdownObject = createThemeDropdownObject(setTheme)
10
+ return (
11
+ <Cancellation
12
+ {...props}
13
+ customTheme={theme}
14
+ themeDropdownObject={themeDropdownObject}
15
+ />
16
+ )
9
17
  }
10
18
 
11
19
  export default AccountCancellation
@@ -8,10 +8,12 @@ import {
8
8
  } from '@newskit-render/my-account'
9
9
  import validation from '../../../validation'
10
10
  import { AppContext } from '../../../app-context/AppContext'
11
+ import { createThemeDropdownObject } from '../../../helpers/createThemeDropdownObject'
11
12
 
12
13
  const AccountEditField = (props) => {
13
14
  const doesEditPageExist = Object.keys(componentMap).includes(props.data.type)
14
15
  const { theme, setTheme } = useContext(AppContext)
16
+ const themeDropdownObject = createThemeDropdownObject(setTheme)
15
17
 
16
18
  if (doesEditPageExist) {
17
19
  return (
@@ -19,7 +21,7 @@ const AccountEditField = (props) => {
19
21
  {...props}
20
22
  validation={validation}
21
23
  customTheme={theme}
22
- setTheme={setTheme}
24
+ themeDropdownObject={themeDropdownObject}
23
25
  />
24
26
  )
25
27
  }
@@ -2,10 +2,18 @@ import newrelic from 'newrelic'
2
2
  import { PersonalDetails, getProviderProps } from '@newskit-render/my-account'
3
3
  import React, { useContext } from 'react'
4
4
  import { AppContext } from '../../app-context/AppContext'
5
+ import { createThemeDropdownObject } from '../../helpers/createThemeDropdownObject'
5
6
 
6
7
  const AccountPersonalDetails = (props) => {
7
8
  const { theme, setTheme } = useContext(AppContext)
8
- return <PersonalDetails {...props} customTheme={theme} setTheme={setTheme} />
9
+ const themeDropdownObject = createThemeDropdownObject(setTheme)
10
+ return (
11
+ <PersonalDetails
12
+ {...props}
13
+ customTheme={theme}
14
+ themeDropdownObject={themeDropdownObject}
15
+ />
16
+ )
9
17
  }
10
18
 
11
19
  export default AccountPersonalDetails
@@ -5,11 +5,17 @@ import {
5
5
  import newrelic from 'newrelic'
6
6
  import React, { useContext } from 'react'
7
7
  import { AppContext } from '../../../app-context/AppContext'
8
+ import { createThemeDropdownObject } from '../../../helpers/createThemeDropdownObject'
8
9
 
9
10
  const AccountNewslettersAndAlerts = (props) => {
10
11
  const { theme, setTheme } = useContext(AppContext)
12
+ const themeDropdownObject = createThemeDropdownObject(setTheme)
11
13
  return (
12
- <NewslettersAndAlerts {...props} customTheme={theme} setTheme={setTheme} />
14
+ <NewslettersAndAlerts
15
+ {...props}
16
+ customTheme={theme}
17
+ themeDropdownObject={themeDropdownObject}
18
+ />
13
19
  )
14
20
  }
15
21
 
@@ -6,10 +6,18 @@ import {
6
6
  } from '@newskit-render/my-account'
7
7
  import React, { useContext } from 'react'
8
8
  import { AppContext } from '../../../app-context/AppContext'
9
+ import { createThemeDropdownObject } from '../../../helpers/createThemeDropdownObject'
9
10
 
10
11
  const AccountCancellation = (props) => {
11
12
  const { theme, setTheme } = useContext(AppContext)
12
- return <Payment {...props} customTheme={theme} setTheme={setTheme} />
13
+ const themeDropdownObject = createThemeDropdownObject(setTheme)
14
+ return (
15
+ <Payment
16
+ {...props}
17
+ customTheme={theme}
18
+ themeDropdownObject={themeDropdownObject}
19
+ />
20
+ )
13
21
  }
14
22
 
15
23
  export default AccountCancellation
@@ -5,14 +5,16 @@ import {
5
5
  import newrelic from 'newrelic'
6
6
  import React, { useContext } from 'react'
7
7
  import { AppContext } from '../../../app-context/AppContext'
8
+ import { createThemeDropdownObject } from '../../../helpers/createThemeDropdownObject'
8
9
 
9
10
  const AccountSubscriptionAndBilling = (props) => {
10
11
  const { theme, setTheme } = useContext(AppContext)
12
+ const themeDropdownObject = createThemeDropdownObject(setTheme)
11
13
  return (
12
14
  <SubscriptionAndBilling
13
15
  {...props}
14
16
  customTheme={theme}
15
- setTheme={setTheme}
17
+ themeDropdownObject={themeDropdownObject}
16
18
  />
17
19
  )
18
20
  }
@@ -1,6 +1,15 @@
1
1
  import { NextApiRequest, NextApiResponse } from 'next'
2
- import { genericSitemap, PublisherGroup } from '@newskit-render/sitemap'
2
+ import {
3
+ genericSitemap,
4
+ PublisherGroup,
5
+ CustomStaticPage,
6
+ } from '@newskit-render/sitemap'
3
7
 
8
+ const defaultCustomStaticPagesCollection: CustomStaticPage[] = [
9
+ {
10
+ channel: 'test-custom-page',
11
+ },
12
+ ]
4
13
  const handler = async (req: NextApiRequest, res: NextApiResponse) =>
5
14
  genericSitemap({
6
15
  res,
@@ -9,6 +18,7 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) =>
9
18
  domain: new URL(process.env.SITE_HOST as string).host,
10
19
  firstArticleDate: process.env.SITEMAP_FIRST_PUBLICATION_DATE as string,
11
20
  publicationName: process.env.SITEMAP_PUBLICATION_NAME as string,
21
+ customStaticPageCollection: defaultCustomStaticPagesCollection,
12
22
  })
13
23
 
14
24
  export default handler
@@ -2,14 +2,16 @@ import { AccountCreation, getProviderProps } from '@newskit-render/checkout'
2
2
  import React, { useContext } from 'react'
3
3
  import { AppContext } from '../../../app-context/AppContext'
4
4
  import validation from '../../../validation'
5
+ import { createThemeDropdownObject } from '../../../helpers/createThemeDropdownObject'
5
6
 
6
7
  const AccountCreationPage = (props) => {
7
8
  const { theme, setTheme } = useContext(AppContext)
9
+ const themeDropdownObject = createThemeDropdownObject(setTheme)
8
10
  return (
9
11
  <AccountCreation
10
12
  {...props}
11
13
  customTheme={theme}
12
- setTheme={setTheme}
14
+ themeDropdownObject={themeDropdownObject}
13
15
  validation={validation}
14
16
  />
15
17
  )
@@ -1,10 +1,18 @@
1
1
  import { PaymentDetails, getProviderProps } from '@newskit-render/checkout'
2
2
  import React, { useContext } from 'react'
3
3
  import { AppContext } from '../../../app-context/AppContext'
4
+ import { createThemeDropdownObject } from '../../../helpers/createThemeDropdownObject'
4
5
 
5
6
  const PaymentDetailsPage = (props) => {
6
7
  const { theme, setTheme } = useContext(AppContext)
7
- return <PaymentDetails {...props} customTheme={theme} setTheme={setTheme} />
8
+ const themeDropdownObject = createThemeDropdownObject(setTheme)
9
+ return (
10
+ <PaymentDetails
11
+ {...props}
12
+ customTheme={theme}
13
+ themeDropdownObject={themeDropdownObject}
14
+ />
15
+ )
8
16
  }
9
17
 
10
18
  export default PaymentDetailsPage