@newskit-render/core 0.0.0-a0d00f7fa → 0.0.0-b34c9a55b
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 +112 -0
- package/cypress/e2e/account/newsletters-page.cy.js +21 -2
- package/cypress/e2e/account/subscription-and-billing.cy.js +2 -2
- package/cypress/support/blaizeJwtValues.js +3 -0
- package/cypress/support/commands.js +6 -1
- package/helpers/getProviderPropsUtil.ts +17 -0
- package/package.json +8 -8
- package/pages/account/add/[field].tsx +13 -56
- package/pages/account/cancellation/index.tsx +3 -2
- package/pages/account/delete/confirm/index.tsx +3 -5
- package/pages/account/delete/error/index.tsx +3 -5
- package/pages/account/delete/index.tsx +3 -5
- package/pages/account/delete/success/index.tsx +3 -5
- package/pages/account/dream-team/index.tsx +3 -2
- package/pages/account/edit/[field].tsx +2 -3
- package/pages/account/family/index.tsx +7 -3
- package/pages/account/holiday-stop/index.tsx +3 -6
- package/pages/account/holiday-stop/previous-holiday-stops.tsx +3 -6
- package/pages/account/holiday-stop/upcoming-holiday-stops.tsx +3 -6
- package/pages/account/index.tsx +3 -6
- package/pages/account/newsletters/index.tsx +3 -2
- package/pages/account/newsletters-and-alerts/index.tsx +3 -6
- package/pages/account/payment/[paymentMethod].tsx +2 -3
- package/pages/account/payment/index.tsx +3 -2
- package/pages/account/payment-methods/index.tsx +3 -6
- package/pages/account/subscription-and-billing/index.tsx +3 -6
- package/pages/account/user-hub/index.tsx +3 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,118 @@
|
|
|
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
|
+
## [4.35.3](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@4.35.3-alpha.0...@newskit-render/core@4.35.3) (2024-10-11)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @newskit-render/core
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [4.35.2](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@4.35.2-alpha.0...@newskit-render/core@4.35.2) (2024-10-11)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @newskit-render/core
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [4.35.1](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@4.35.1-alpha.2...@newskit-render/core@4.35.1) (2024-10-10)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @newskit-render/core
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
# [4.35.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@4.35.0-alpha.0...@newskit-render/core@4.35.0) (2024-10-02)
|
|
31
|
+
|
|
32
|
+
**Note:** Version bump only for package @newskit-render/core
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
## [4.34.7](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@4.34.7-alpha.0...@newskit-render/core@4.34.7) (2024-09-25)
|
|
39
|
+
|
|
40
|
+
**Note:** Version bump only for package @newskit-render/core
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
## [4.34.6](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@4.34.6-alpha.0...@newskit-render/core@4.34.6) (2024-09-20)
|
|
47
|
+
|
|
48
|
+
**Note:** Version bump only for package @newskit-render/core
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
## [4.34.5](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@4.34.5-alpha.0...@newskit-render/core@4.34.5) (2024-09-20)
|
|
55
|
+
|
|
56
|
+
**Note:** Version bump only for package @newskit-render/core
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
## [4.34.4](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@4.34.4-alpha.0...@newskit-render/core@4.34.4) (2024-09-19)
|
|
63
|
+
|
|
64
|
+
**Note:** Version bump only for package @newskit-render/core
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
## [4.34.3](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@4.34.3-alpha.0...@newskit-render/core@4.34.3) (2024-09-18)
|
|
71
|
+
|
|
72
|
+
**Note:** Version bump only for package @newskit-render/core
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
## [4.34.2](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@4.34.2-alpha.1...@newskit-render/core@4.34.2) (2024-09-16)
|
|
79
|
+
|
|
80
|
+
**Note:** Version bump only for package @newskit-render/core
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
## [4.34.1](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@4.34.1-alpha.0...@newskit-render/core@4.34.1) (2024-09-13)
|
|
87
|
+
|
|
88
|
+
**Note:** Version bump only for package @newskit-render/core
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
# [4.34.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@4.34.0-alpha.0...@newskit-render/core@4.34.0) (2024-09-12)
|
|
95
|
+
|
|
96
|
+
**Note:** Version bump only for package @newskit-render/core
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
## [4.33.1](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@4.33.1-alpha.0...@newskit-render/core@4.33.1) (2024-09-10)
|
|
103
|
+
|
|
104
|
+
**Note:** Version bump only for package @newskit-render/core
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
# [4.33.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@4.33.0-alpha.0...@newskit-render/core@4.33.0) (2024-09-10)
|
|
111
|
+
|
|
112
|
+
**Note:** Version bump only for package @newskit-render/core
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
6
118
|
## [4.32.1](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@4.32.1-alpha.1...@newskit-render/core@4.32.1) (2024-09-05)
|
|
7
119
|
|
|
8
120
|
**Note:** Version bump only for package @newskit-render/core
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
registration_blaize_jwt,
|
|
3
|
+
subscription_blaize_jwt,
|
|
4
|
+
} from '../../support/blaizeJwtValues'
|
|
5
|
+
|
|
1
6
|
describe('Newsletters page', () => {
|
|
2
7
|
beforeEach(() => {
|
|
3
8
|
cy.GetTnlAcsSession()
|
|
4
|
-
cy.
|
|
9
|
+
cy.mockConsent()
|
|
5
10
|
})
|
|
6
11
|
|
|
7
|
-
it('Should display the newsletters page', () => {
|
|
12
|
+
it('Should display all the newsletters on the newsletters page when user is subscribed', () => {
|
|
13
|
+
cy.mockBlaizeJwtAndVisit(subscription_blaize_jwt, '/account/newsletters')
|
|
8
14
|
cy.contains('Newsletters')
|
|
9
15
|
cy.contains(
|
|
10
16
|
'Exclusive content and a curated selection of our top stories straight to your inbox.'
|
|
@@ -12,7 +18,18 @@ describe('Newsletters page', () => {
|
|
|
12
18
|
cy.get('[data-testid="newsletters-grid"] > div').should('have.length', 20)
|
|
13
19
|
})
|
|
14
20
|
|
|
21
|
+
// Commented out because Optimizely feature flag with tm-my-account key is causing it to fail in this repo. Test should be re-enabled once feature flag is removed.
|
|
22
|
+
// it('Should only display selected newsletters on the newsletters page when user is registered', () => {
|
|
23
|
+
// cy.mockBlaizeJwtAndVisit(registration_blaize_jwt, '/account/newsletters')
|
|
24
|
+
// cy.contains('Newsletters')
|
|
25
|
+
// cy.contains(
|
|
26
|
+
// 'Exclusive content and a curated selection of our top stories straight to your inbox.'
|
|
27
|
+
// )
|
|
28
|
+
// cy.get('[data-testid="newsletters-grid"] > div').should('have.length', 12)
|
|
29
|
+
// })
|
|
30
|
+
|
|
15
31
|
it('Should display all required newsletter text in the first grid card', () => {
|
|
32
|
+
cy.mockBlaizeJwtAndVisit(subscription_blaize_jwt, '/account/newsletters')
|
|
16
33
|
cy.get('[data-testid="newsletters-grid"]').then(($parentDiv) => {
|
|
17
34
|
const firstNewsletter = $parentDiv.find('div:first-child')
|
|
18
35
|
|
|
@@ -27,6 +44,7 @@ describe('Newsletters page', () => {
|
|
|
27
44
|
})
|
|
28
45
|
|
|
29
46
|
it('Should successfully subscribe to a newsletter', () => {
|
|
47
|
+
cy.mockBlaizeJwtAndVisit(subscription_blaize_jwt, '/account/newsletters')
|
|
30
48
|
cy.get('[data-testid="newsletters-grid"]').then(($parentDiv) => {
|
|
31
49
|
cy.intercept('POST', '/api/account/mutate', { statusCode: 200, ok: true })
|
|
32
50
|
|
|
@@ -46,6 +64,7 @@ describe('Newsletters page', () => {
|
|
|
46
64
|
})
|
|
47
65
|
|
|
48
66
|
it('Should show the error toast on server error', () => {
|
|
67
|
+
cy.mockBlaizeJwtAndVisit(subscription_blaize_jwt, '/account/newsletters')
|
|
49
68
|
cy.get('[data-testid="newsletters-grid"]').then(($parentDiv) => {
|
|
50
69
|
cy.intercept('POST', '/api/account/mutate', {
|
|
51
70
|
statusCode: 500,
|
|
@@ -134,8 +134,8 @@ describe('Subscription and billing details for Digital user', () => {
|
|
|
134
134
|
cy.contains('[data-testid="ContentListIntroduction"]', 'Billing details')
|
|
135
135
|
cy.contains('Payment method')
|
|
136
136
|
cy.get('[data-testid="visa-icon"]').should('exist')
|
|
137
|
-
cy.contains('************
|
|
138
|
-
cy.contains('expiry date
|
|
137
|
+
cy.contains('************4242')
|
|
138
|
+
cy.contains('expiry date 02/27')
|
|
139
139
|
})
|
|
140
140
|
|
|
141
141
|
it('Should display Invoice history section', () => {
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export const subscription_blaize_jwt = 'eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ7XCJjcG5cIjpcIkFBQUEwMjU1OTcwNDVcIixcInByb2R1Y3RzXCI6W1wiVGhlIFRpbWVzIFNpdGUgUHJvZHVjdFwiLFwiVGltZXMgU3BvcnRzIEFwcFwiLFwiVGhlIFRpbWVzIEVQTCBWaWRlbyBQcm9kdWN0XCIsXCJUaGUgU3VuZGF5IFRpbWVzIGlQaG9uZSBhcHAgcHJvZHVjdFwiLFwiRW1haWwgQnVsbGV0aW5zIFByb2R1Y3RcIixcIlRoZSBTdW5kYXkgVGltZXMgTW9iaSBQcm9kdWN0XCIsXCJUaGUgU3VuZGF5IFRpbWVzIGlQYWQgYXBwIHByb2R1Y3RcIixcImUtcGFwZXIgUHJvZHVjdFwiLFwiRGFpbHkgQ3Jvc3N3b3JkIFByb2R1Y3RcIixcIlRoZSBTdW5kYXkgVGltZXMgU2l0ZSBQcm9kdWN0XCIsXCJUaGUgVGltZXMgTW9iaSBQcm9kdWN0XCIsXCJUaGUgVGltZXMgaVBhZCBhcHAgUHJvZHVjdFwiLFwiRGlnaXRhbCBTdWJzY3JpcHRpb24gUHJvZHVjdFwiLFwiVGhlIFRpbWVzIGlQaG9uZSBhcHAgcHJvZHVjdFwiLFwiVGltZXMrIG1lbWJlcnNoaXAgYmVuZWZpdHMgUHJvZHVjdFwiXX0iLCJodHRwczpcL1wvdGhldGltZXMuY28udWtcL2NwbiI6IkFBQUEwMjU1OTcwNDUiLCJodHRwczpcL1wvdGhldGltZXMuY28udWtcL3N1YnNjcmlwdGlvbiI6IlNVQi0wMDEwOTcyNjQ0IiwiaXNzIjoiLnRoZXRpbWVzLmNvbSIsImh0dHBzOlwvXC90aGV0aW1lcy5jby51a1wvcHJvZHVjdHMiOlsiVGhlIFRpbWVzIFNpdGUgUHJvZHVjdCIsIlRpbWVzIFNwb3J0cyBBcHAiLCJUaGUgVGltZXMgRVBMIFZpZGVvIFByb2R1Y3QiLCJUaGUgU3VuZGF5IFRpbWVzIGlQaG9uZSBhcHAgcHJvZHVjdCIsIkVtYWlsIEJ1bGxldGlucyBQcm9kdWN0IiwiVGhlIFN1bmRheSBUaW1lcyBNb2JpIFByb2R1Y3QiLCJUaGUgU3VuZGF5IFRpbWVzIGlQYWQgYXBwIHByb2R1Y3QiLCJlLXBhcGVyIFByb2R1Y3QiLCJEYWlseSBDcm9zc3dvcmQgUHJvZHVjdCIsIlRoZSBTdW5kYXkgVGltZXMgU2l0ZSBQcm9kdWN0IiwiVGhlIFRpbWVzIE1vYmkgUHJvZHVjdCIsIlRoZSBUaW1lcyBpUGFkIGFwcCBQcm9kdWN0IiwiRGlnaXRhbCBTdWJzY3JpcHRpb24gUHJvZHVjdCIsIlRoZSBUaW1lcyBpUGhvbmUgYXBwIHByb2R1Y3QiLCJUaW1lcysgbWVtYmVyc2hpcCBiZW5lZml0cyBQcm9kdWN0Il0sImV4cCI6MTcxNjk4ODc3OSwiaWF0IjoxNzE2MzgzOTc5fQ.JTqe7UJo985At-2JkuMrH-6H__qzwZwBGRnEJXl4CSM'
|
|
2
|
+
|
|
3
|
+
export const registration_blaize_jwt = 'eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ7XCJjcG5cIjpcIkNQTi1YNlpOWFBRUlFcIixcInByb2R1Y3RzXCI6W119IiwiaHR0cHM6XC9cL3RoZXRpbWVzLmNvLnVrXC9jcG4iOiJDUE4tWDZaTlhQUVJRIiwiaHR0cHM6XC9cL3RoZXRpbWVzLmNvLnVrXC9zdWJzY3JpcHRpb24iOiJFR0FDQy1DUzAwMDAxMzQ0NjI4IiwiaXNzIjoiLnRoZXRpbWVzLmNvLnVrIiwiaHR0cHM6XC9cL3RoZXRpbWVzLmNvLnVrXC9wcm9kdWN0cyI6W10sImV4cCI6MTcyNTQ1NDgwNCwiaWF0IjoxNzI0ODUwMDA0fQ.XGTv2XooQ8VELZsc7bl35D0A9FlOvEWpexNlYpCCK1Q'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//Note: Check periodically if these consent cookie values
|
|
1
|
+
//Note: Check periodically if these consent cookie values expire
|
|
2
2
|
import _ from 'lodash'
|
|
3
3
|
import {
|
|
4
4
|
consentUUIDValue,
|
|
@@ -31,6 +31,11 @@ Cypress.Commands.add('mockConsent', () => {
|
|
|
31
31
|
setConsentLocalStorage()
|
|
32
32
|
})
|
|
33
33
|
|
|
34
|
+
Cypress.Commands.add('mockBlaizeJwtAndVisit', (jwtValue, url) => {
|
|
35
|
+
cy.setCookie('blaize_jwt', jwtValue)
|
|
36
|
+
cy.visit(url)
|
|
37
|
+
})
|
|
38
|
+
|
|
34
39
|
Cypress.Commands.add('GetAcsSession', (user = 'default') => {
|
|
35
40
|
const { username, password } = userMap[user]
|
|
36
41
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getProviderProps,
|
|
3
|
+
getProviderPropsTimes,
|
|
4
|
+
} from '@newskit-render/my-account'
|
|
5
|
+
import { publisher } from '../config'
|
|
6
|
+
|
|
7
|
+
export const getProviderPropsUtil = (context, featureFlags?) => {
|
|
8
|
+
if (process.env.NODE_ENV === 'development' && publisher === 'TIMES') {
|
|
9
|
+
return getProviderPropsTimes(context, {
|
|
10
|
+
featureFlags,
|
|
11
|
+
})
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
return getProviderProps(context, {
|
|
15
|
+
featureFlags,
|
|
16
|
+
})
|
|
17
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@newskit-render/core",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-b34c9a55b",
|
|
4
4
|
"description": "Newskit Render - Core package",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -42,15 +42,15 @@
|
|
|
42
42
|
"@emotion/styled": "11.9.3",
|
|
43
43
|
"@newrelic/next": "0.5.2",
|
|
44
44
|
"@newrelic/winston-enricher": "4.0.1",
|
|
45
|
-
"@newskit-render/api": "^1.
|
|
45
|
+
"@newskit-render/api": "^1.14.0",
|
|
46
46
|
"@newskit-render/auth": "^1.8.1",
|
|
47
|
-
"@newskit-render/checkout": "^3.10.
|
|
47
|
+
"@newskit-render/checkout": "^3.10.16",
|
|
48
48
|
"@newskit-render/feature-flags": "^1.10.0",
|
|
49
|
-
"@newskit-render/feed": "^1.8.
|
|
50
|
-
"@newskit-render/my-account": "^7.
|
|
51
|
-
"@newskit-render/shared-components": "^4.
|
|
52
|
-
"@newskit-render/standalone-components": "^3.
|
|
53
|
-
"@newskit-render/validation": "^1.17.
|
|
49
|
+
"@newskit-render/feed": "^1.8.13",
|
|
50
|
+
"@newskit-render/my-account": "^7.72.3",
|
|
51
|
+
"@newskit-render/shared-components": "^4.32.3",
|
|
52
|
+
"@newskit-render/standalone-components": "^3.22.4",
|
|
53
|
+
"@newskit-render/validation": "^1.17.2",
|
|
54
54
|
"cross-fetch": "3.1.5",
|
|
55
55
|
"graphql": "16.6.0",
|
|
56
56
|
"lodash.get": "4.4.2",
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
|
|
3
|
-
import {
|
|
4
|
-
AddField,
|
|
5
|
-
addComponentMap,
|
|
6
|
-
getProviderPropsTimes,
|
|
7
|
-
// getProviderProps,
|
|
8
|
-
} from '@newskit-render/my-account'
|
|
3
|
+
import { AddField, addComponentMap } from '@newskit-render/my-account'
|
|
9
4
|
import validation from '../../../validation'
|
|
10
5
|
import { DynamicPage } from '@newskit-render/my-account'
|
|
6
|
+
import { getAllFeatureFlags } from '@newskit-render/feature-flags' /* cra-effected */
|
|
7
|
+
import { getProviderPropsUtil } from '../../../helpers/getProviderPropsUtil'
|
|
11
8
|
|
|
12
9
|
const AccountAddField = (props) => (
|
|
13
10
|
<DynamicPage
|
|
@@ -20,67 +17,27 @@ const AccountAddField = (props) => (
|
|
|
20
17
|
)
|
|
21
18
|
|
|
22
19
|
export default AccountAddField
|
|
23
|
-
// export const getServerSideProps = async (context) => {
|
|
24
|
-
// const {
|
|
25
|
-
// params: { field },
|
|
26
|
-
// } = context
|
|
27
|
-
// const doesAddpageExist = Object.keys(addComponentMap).includes(field)
|
|
28
|
-
// replaceConsoleAndSetTransactionName(`Account: add ${field}`)
|
|
29
|
-
|
|
30
|
-
// if (!doesAddpageExist) {
|
|
31
|
-
// context.res.statusCode = 404
|
|
32
|
-
// // Logging the error for being captured by New Relic
|
|
33
|
-
// console.error(`An error ${context.res.statusCode} occurred on server`)
|
|
34
|
-
// }
|
|
35
|
-
|
|
36
|
-
// return {
|
|
37
|
-
// props: { data: { type: field } },
|
|
38
|
-
// }
|
|
39
|
-
// }
|
|
40
|
-
|
|
41
20
|
export const getServerSideProps = async (context) => {
|
|
42
|
-
// const featureFlags = await getAllFeatureFlags(
|
|
43
|
-
// getUserAttributes(context?.req?.headers)
|
|
44
|
-
// )
|
|
45
|
-
|
|
46
21
|
const {
|
|
47
22
|
params: { field },
|
|
48
23
|
} = context
|
|
49
|
-
const
|
|
50
|
-
|
|
24
|
+
const doesAddpageExist = Object.keys(addComponentMap).includes(field)
|
|
51
25
|
replaceConsoleAndSetTransactionName(`Account: add ${field}`)
|
|
52
26
|
|
|
53
|
-
|
|
54
|
-
props: { data: { type: field }, requestHeaders: context.req.headers },
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
const getProviderPropsResponse = (await getProviderPropsTimes({
|
|
58
|
-
...context,
|
|
59
|
-
provider: 'AddField',
|
|
60
|
-
})) as unknown as { props: unknown }
|
|
61
|
-
console.log('getProviderPropsResponse', getProviderPropsResponse)
|
|
62
|
-
|
|
63
|
-
if (!doesAddPageExist) {
|
|
27
|
+
if (!doesAddpageExist) {
|
|
64
28
|
context.res.statusCode = 404
|
|
65
29
|
// Logging the error for being captured by New Relic
|
|
66
30
|
console.error(`An error ${context.res.statusCode} occurred on server`)
|
|
67
|
-
|
|
68
|
-
// The 404 logic for non-existent [add] components is added in the DynamicPage
|
|
69
|
-
return defaultPageResponse
|
|
70
31
|
}
|
|
71
32
|
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
|
|
33
|
+
const featureFlags = await getAllFeatureFlags()
|
|
34
|
+
const providerProps = (await getProviderPropsUtil(
|
|
35
|
+
{ ...context, provider: 'AddField' },
|
|
36
|
+
{ featureFlags } /* cra-effected */
|
|
37
|
+
)) as unknown as { props: { data: { type: string } } }
|
|
75
38
|
|
|
76
|
-
if (
|
|
77
|
-
|
|
78
|
-
redirect: {
|
|
79
|
-
permanent: false,
|
|
80
|
-
destination: '/404',
|
|
81
|
-
},
|
|
82
|
-
}
|
|
39
|
+
if (providerProps?.props) {
|
|
40
|
+
providerProps.props = { ...providerProps.props, data: { type: field } }
|
|
83
41
|
}
|
|
84
|
-
|
|
85
|
-
return defaultPageResponse
|
|
42
|
+
return providerProps
|
|
86
43
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { Cancellation
|
|
2
|
+
import { Cancellation } from '@newskit-render/my-account'
|
|
3
3
|
import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
|
|
4
4
|
import { getAllFeatureFlags } from '@newskit-render/feature-flags' /* cra-effected */
|
|
5
5
|
import validation from '../../../validation'
|
|
6
|
+
import { getProviderPropsUtil } from '../../../helpers/getProviderPropsUtil'
|
|
6
7
|
|
|
7
8
|
const AccountCancellation = (props) => (
|
|
8
9
|
<Cancellation {...props} validation={validation} />
|
|
@@ -15,7 +16,7 @@ export const getServerSideProps = async (context) => {
|
|
|
15
16
|
/* start cra-effected */
|
|
16
17
|
const featureFlags = await getAllFeatureFlags()
|
|
17
18
|
/* end cra-effected */
|
|
18
|
-
return
|
|
19
|
+
return getProviderPropsUtil(
|
|
19
20
|
{ ...context, provider: 'Cancellation' },
|
|
20
21
|
{ featureFlags } /* cra-effected */
|
|
21
22
|
)
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import {
|
|
3
|
-
ConfirmAccountDeletion,
|
|
4
|
-
getProviderProps,
|
|
5
|
-
} from '@newskit-render/my-account'
|
|
2
|
+
import { ConfirmAccountDeletion } from '@newskit-render/my-account'
|
|
6
3
|
import { replaceConsoleAndSetTransactionName } from '../../../../helpers/logger'
|
|
4
|
+
import { getProviderPropsUtil } from '../../../../helpers/getProviderPropsUtil'
|
|
7
5
|
|
|
8
6
|
const ConfirmDeletion = (props) => <ConfirmAccountDeletion {...props} />
|
|
9
7
|
|
|
@@ -12,5 +10,5 @@ export default ConfirmDeletion
|
|
|
12
10
|
export const getServerSideProps = async (context) => {
|
|
13
11
|
replaceConsoleAndSetTransactionName('Account: Deletion - Confirmation')
|
|
14
12
|
|
|
15
|
-
return
|
|
13
|
+
return getProviderPropsUtil({ ...context })
|
|
16
14
|
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import {
|
|
3
|
-
AccountDeletionError,
|
|
4
|
-
getProviderProps,
|
|
5
|
-
} from '@newskit-render/my-account'
|
|
2
|
+
import { AccountDeletionError } from '@newskit-render/my-account'
|
|
6
3
|
import { replaceConsoleAndSetTransactionName } from '../../../../helpers/logger'
|
|
4
|
+
import { getProviderPropsUtil } from '../../../../helpers/getProviderPropsUtil'
|
|
7
5
|
|
|
8
6
|
const Error = (props) => <AccountDeletionError {...props} />
|
|
9
7
|
|
|
@@ -12,5 +10,5 @@ export default Error
|
|
|
12
10
|
export const getServerSideProps = async (context) => {
|
|
13
11
|
replaceConsoleAndSetTransactionName('Account: Deletion - Error')
|
|
14
12
|
|
|
15
|
-
return
|
|
13
|
+
return getProviderPropsUtil({ ...context })
|
|
16
14
|
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import {
|
|
3
|
-
InitiateAccountDeletion,
|
|
4
|
-
getProviderProps,
|
|
5
|
-
} from '@newskit-render/my-account'
|
|
2
|
+
import { InitiateAccountDeletion } from '@newskit-render/my-account'
|
|
6
3
|
import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
|
|
4
|
+
import { getProviderPropsUtil } from '../../../helpers/getProviderPropsUtil'
|
|
7
5
|
|
|
8
6
|
const AccountDeletion = (props) => <InitiateAccountDeletion {...props} />
|
|
9
7
|
|
|
@@ -12,5 +10,5 @@ export default AccountDeletion
|
|
|
12
10
|
export const getServerSideProps = async (context) => {
|
|
13
11
|
replaceConsoleAndSetTransactionName('Account: Deletion')
|
|
14
12
|
|
|
15
|
-
return
|
|
13
|
+
return getProviderPropsUtil({ ...context })
|
|
16
14
|
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import {
|
|
3
|
-
AccountDeletionSuccess,
|
|
4
|
-
getProviderProps,
|
|
5
|
-
} from '@newskit-render/my-account'
|
|
2
|
+
import { AccountDeletionSuccess } from '@newskit-render/my-account'
|
|
6
3
|
import { replaceConsoleAndSetTransactionName } from '../../../../helpers/logger'
|
|
4
|
+
import { getProviderPropsUtil } from '../../../../helpers/getProviderPropsUtil'
|
|
7
5
|
|
|
8
6
|
const Success = (props) => <AccountDeletionSuccess {...props} />
|
|
9
7
|
|
|
@@ -12,5 +10,5 @@ export default Success
|
|
|
12
10
|
export const getServerSideProps = async (context) => {
|
|
13
11
|
replaceConsoleAndSetTransactionName('Account: Deletion - Success')
|
|
14
12
|
|
|
15
|
-
return
|
|
13
|
+
return getProviderPropsUtil({ ...context })
|
|
16
14
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { DreamTeam
|
|
2
|
+
import { DreamTeam } from '@newskit-render/my-account'
|
|
3
3
|
import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
|
|
4
4
|
import { getAllFeatureFlags } from '@newskit-render/feature-flags' /* cra-effected */
|
|
5
|
+
import { getProviderPropsUtil } from '../../../helpers/getProviderPropsUtil'
|
|
5
6
|
|
|
6
7
|
const AccountNewslettersAndAlerts = (props) => <DreamTeam {...props} />
|
|
7
8
|
|
|
@@ -12,7 +13,7 @@ export const getServerSideProps = async (context) => {
|
|
|
12
13
|
/* start cra-effected */
|
|
13
14
|
const featureFlags = await getAllFeatureFlags()
|
|
14
15
|
/* end cra-effected */
|
|
15
|
-
return
|
|
16
|
+
return getProviderPropsUtil(
|
|
16
17
|
{ ...context, provider: 'DreamTeam' },
|
|
17
18
|
{ featureFlags } /* cra-effected */
|
|
18
19
|
)
|
|
@@ -2,13 +2,12 @@ import React from 'react'
|
|
|
2
2
|
import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
|
|
3
3
|
import {
|
|
4
4
|
EditField,
|
|
5
|
-
// getProviderProps,
|
|
6
|
-
getProviderPropsTimes,
|
|
7
5
|
editComponentMap,
|
|
8
6
|
DynamicPage,
|
|
9
7
|
} from '@newskit-render/my-account'
|
|
10
8
|
import { getAllFeatureFlags } from '@newskit-render/feature-flags' /* cra-effected */
|
|
11
9
|
import validation from '../../../validation'
|
|
10
|
+
import { getProviderPropsUtil } from '../../../helpers/getProviderPropsUtil'
|
|
12
11
|
|
|
13
12
|
const AccountEditField = (props) => (
|
|
14
13
|
<DynamicPage
|
|
@@ -39,7 +38,7 @@ export const getServerSideProps = async (context) => {
|
|
|
39
38
|
const featureFlags = await getAllFeatureFlags()
|
|
40
39
|
/* end cra-effected */
|
|
41
40
|
|
|
42
|
-
return
|
|
41
|
+
return getProviderPropsUtil(
|
|
43
42
|
{ ...context, provider: 'EditField' },
|
|
44
43
|
{ featureFlags } /* cra-effected */
|
|
45
44
|
)
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { Family
|
|
2
|
+
import { Family } from '@newskit-render/my-account'
|
|
3
3
|
import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
|
|
4
4
|
import { getAllFeatureFlags } from '@newskit-render/feature-flags' /* cra-effected */
|
|
5
|
+
import { getProviderPropsUtil } from '../../../helpers/getProviderPropsUtil'
|
|
5
6
|
|
|
6
7
|
const AccountFamily = (props) => <Family {...props} />
|
|
7
8
|
|
|
@@ -12,8 +13,11 @@ export const getServerSideProps = async (context) => {
|
|
|
12
13
|
/* start cra-effected */
|
|
13
14
|
const featureFlags = await getAllFeatureFlags()
|
|
14
15
|
/* end cra-effected */
|
|
15
|
-
return
|
|
16
|
-
{
|
|
16
|
+
return getProviderPropsUtil(
|
|
17
|
+
{
|
|
18
|
+
...context,
|
|
19
|
+
provider: 'GroupAccounts',
|
|
20
|
+
},
|
|
17
21
|
{ featureFlags } /* cra-effected */
|
|
18
22
|
)
|
|
19
23
|
}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import {
|
|
3
|
-
// getProviderProps,
|
|
4
|
-
getProviderPropsTimes,
|
|
5
|
-
HolidayStop,
|
|
6
|
-
} from '@newskit-render/my-account'
|
|
2
|
+
import { HolidayStop } from '@newskit-render/my-account'
|
|
7
3
|
import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
|
|
8
4
|
import { getAllFeatureFlags } from '@newskit-render/feature-flags' /* cra-effected */
|
|
5
|
+
import { getProviderPropsUtil } from '../../../helpers/getProviderPropsUtil'
|
|
9
6
|
|
|
10
7
|
const AccountHolidayStop = (props) => <HolidayStop {...props} />
|
|
11
8
|
|
|
@@ -16,7 +13,7 @@ export const getServerSideProps = async (context) => {
|
|
|
16
13
|
/* start cra-effected */
|
|
17
14
|
const featureFlags = await getAllFeatureFlags()
|
|
18
15
|
/* end cra-effected */
|
|
19
|
-
return
|
|
16
|
+
return getProviderPropsUtil(
|
|
20
17
|
{ ...context, provider: 'HolidayStop' },
|
|
21
18
|
{ featureFlags } /* cra-effected */
|
|
22
19
|
)
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import {
|
|
3
|
-
// getProviderProps,
|
|
4
|
-
getProviderPropsTimes,
|
|
5
|
-
HolidayStopList,
|
|
6
|
-
} from '@newskit-render/my-account'
|
|
2
|
+
import { HolidayStopList } from '@newskit-render/my-account'
|
|
7
3
|
import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
|
|
8
4
|
import { holidayStopListContextOverrides } from '../../../context/app-context/holidayStopListContextOverrides'
|
|
5
|
+
import { getProviderPropsUtil } from '../../../helpers/getProviderPropsUtil'
|
|
9
6
|
|
|
10
7
|
const AccountPreviousHolidayStops = (props) => (
|
|
11
8
|
<HolidayStopList
|
|
@@ -19,5 +16,5 @@ export default AccountPreviousHolidayStops
|
|
|
19
16
|
|
|
20
17
|
export const getServerSideProps = async (context) => {
|
|
21
18
|
replaceConsoleAndSetTransactionName('Account: Previous Holiday Stops')
|
|
22
|
-
return
|
|
19
|
+
return getProviderPropsUtil({ ...context, provider: 'HolidayStop' })
|
|
23
20
|
}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import {
|
|
3
|
-
// getProviderProps,
|
|
4
|
-
getProviderPropsTimes,
|
|
5
|
-
HolidayStopList,
|
|
6
|
-
} from '@newskit-render/my-account'
|
|
2
|
+
import { HolidayStopList } from '@newskit-render/my-account'
|
|
7
3
|
import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
|
|
8
4
|
import { holidayStopListContextOverrides } from '../../../context/app-context/holidayStopListContextOverrides'
|
|
5
|
+
import { getProviderPropsUtil } from '../../../helpers/getProviderPropsUtil'
|
|
9
6
|
|
|
10
7
|
const AccountUpcomingHolidayStops = (props) => (
|
|
11
8
|
<HolidayStopList
|
|
@@ -19,5 +16,5 @@ export default AccountUpcomingHolidayStops
|
|
|
19
16
|
|
|
20
17
|
export const getServerSideProps = async (context) => {
|
|
21
18
|
replaceConsoleAndSetTransactionName('Account: Upcoming Holiday Stops')
|
|
22
|
-
return
|
|
19
|
+
return getProviderPropsUtil({ ...context, provider: 'HolidayStop' })
|
|
23
20
|
}
|
package/pages/account/index.tsx
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import {
|
|
3
|
-
PersonalDetails,
|
|
4
|
-
getProviderPropsTimes,
|
|
5
|
-
// getProviderProps,
|
|
6
|
-
} from '@newskit-render/my-account'
|
|
2
|
+
import { PersonalDetails } from '@newskit-render/my-account'
|
|
7
3
|
import { getAllFeatureFlags } from '@newskit-render/feature-flags' /* cra-effected */
|
|
8
4
|
import { AccountDropdown } from '../../components/AccountDropdown' /* cra-disabled */
|
|
9
5
|
import { replaceConsoleAndSetTransactionName } from '../../helpers/logger'
|
|
6
|
+
import { getProviderPropsUtil } from '../../helpers/getProviderPropsUtil'
|
|
10
7
|
|
|
11
8
|
const AccountPersonalDetails = (props) => {
|
|
12
9
|
return (
|
|
@@ -28,7 +25,7 @@ export const getServerSideProps = async (context) => {
|
|
|
28
25
|
|
|
29
26
|
const featureFlags = await getAllFeatureFlags()
|
|
30
27
|
|
|
31
|
-
return
|
|
28
|
+
return getProviderPropsUtil(
|
|
32
29
|
{ ...context, provider: 'PersonalDetails' },
|
|
33
30
|
{ featureFlags } /* cra-effected */
|
|
34
31
|
)
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { Newsletters
|
|
2
|
+
import { Newsletters } from '@newskit-render/my-account'
|
|
3
3
|
import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
|
|
4
4
|
import { getAllFeatureFlags } from '@newskit-render/feature-flags' /* cra-effected */
|
|
5
|
+
import { getProviderPropsUtil } from '../../../helpers/getProviderPropsUtil'
|
|
5
6
|
|
|
6
7
|
const AccountNewsletters = (props) => <Newsletters {...props} />
|
|
7
8
|
|
|
@@ -12,7 +13,7 @@ export const getServerSideProps = async (context) => {
|
|
|
12
13
|
/* start cra-effected */
|
|
13
14
|
const featureFlags = await getAllFeatureFlags()
|
|
14
15
|
/* end cra-effected */
|
|
15
|
-
return
|
|
16
|
+
return getProviderPropsUtil(
|
|
16
17
|
{ ...context, provider: 'Newsletters' },
|
|
17
18
|
{ featureFlags } /* cra-effected */
|
|
18
19
|
)
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import {
|
|
3
|
-
NewslettersAndAlerts,
|
|
4
|
-
getProviderPropsTimes,
|
|
5
|
-
// getProviderProps
|
|
6
|
-
} from '@newskit-render/my-account'
|
|
2
|
+
import { NewslettersAndAlerts } from '@newskit-render/my-account'
|
|
7
3
|
import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
|
|
8
4
|
import { getAllFeatureFlags } from '@newskit-render/feature-flags' /* cra-effected */
|
|
5
|
+
import { getProviderPropsUtil } from '../../../helpers/getProviderPropsUtil'
|
|
9
6
|
|
|
10
7
|
const AccountNewslettersAndAlerts = (props) => (
|
|
11
8
|
<NewslettersAndAlerts {...props} />
|
|
@@ -18,7 +15,7 @@ export const getServerSideProps = async (context) => {
|
|
|
18
15
|
/* start cra-effected */
|
|
19
16
|
const featureFlags = await getAllFeatureFlags()
|
|
20
17
|
/* end cra-effected */
|
|
21
|
-
return
|
|
18
|
+
return getProviderPropsUtil(
|
|
22
19
|
{ ...context, provider: 'NewslettersAndAlerts' },
|
|
23
20
|
{ featureFlags } /* cra-effected */
|
|
24
21
|
)
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
|
|
3
3
|
import {
|
|
4
|
-
// getProviderProps,
|
|
5
|
-
getProviderPropsTimes,
|
|
6
4
|
Payment,
|
|
7
5
|
paymentMethodsMap,
|
|
8
6
|
DynamicPage,
|
|
9
7
|
} from '@newskit-render/my-account'
|
|
10
8
|
import { getAllFeatureFlags } from '@newskit-render/feature-flags' /* cra-effected */
|
|
9
|
+
import { getProviderPropsUtil } from '../../../helpers/getProviderPropsUtil'
|
|
11
10
|
|
|
12
11
|
const PaymentPage = (props) => {
|
|
13
12
|
return (
|
|
@@ -28,7 +27,7 @@ export const getServerSideProps = async (context) => {
|
|
|
28
27
|
const featureFlags = await getAllFeatureFlags()
|
|
29
28
|
/* end cra-effected */
|
|
30
29
|
|
|
31
|
-
return
|
|
30
|
+
return getProviderPropsUtil(
|
|
32
31
|
{
|
|
33
32
|
...context,
|
|
34
33
|
provider: 'Payment',
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
|
|
3
|
-
import { Payment
|
|
3
|
+
import { Payment } from '@newskit-render/my-account'
|
|
4
4
|
import { getAllFeatureFlags } from '@newskit-render/feature-flags' /* cra-effected */
|
|
5
|
+
import { getProviderPropsUtil } from '../../../helpers/getProviderPropsUtil'
|
|
5
6
|
|
|
6
7
|
const AccountPayment = (props) => <Payment {...props} />
|
|
7
8
|
|
|
@@ -13,7 +14,7 @@ export const getServerSideProps = async (context) => {
|
|
|
13
14
|
const featureFlags = await getAllFeatureFlags()
|
|
14
15
|
/* end cra-effected */
|
|
15
16
|
|
|
16
|
-
return
|
|
17
|
+
return getProviderPropsUtil(
|
|
17
18
|
{
|
|
18
19
|
...context,
|
|
19
20
|
provider: 'Payment',
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import {
|
|
3
|
-
// getProviderProps,
|
|
4
|
-
getProviderPropsTimes,
|
|
5
|
-
PaymentMethods,
|
|
6
|
-
} from '@newskit-render/my-account'
|
|
2
|
+
import { PaymentMethods } from '@newskit-render/my-account'
|
|
7
3
|
import { getAllFeatureFlags } from '@newskit-render/feature-flags' // create-render-app effected
|
|
8
4
|
import { paymentMethodContext } from '../../../context/app-context/paymentMethodContext'
|
|
9
5
|
import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
|
|
6
|
+
import { getProviderPropsUtil } from '../../../helpers/getProviderPropsUtil'
|
|
10
7
|
|
|
11
8
|
const AccountPaymentMethods = (props) => (
|
|
12
9
|
<PaymentMethods {...props} context={paymentMethodContext} />
|
|
@@ -18,7 +15,7 @@ export const getServerSideProps = async (context) => {
|
|
|
18
15
|
replaceConsoleAndSetTransactionName('Account: Payment Methods')
|
|
19
16
|
const featureFlags = await getAllFeatureFlags()
|
|
20
17
|
// create-render-app effected
|
|
21
|
-
return
|
|
18
|
+
return getProviderPropsUtil(
|
|
22
19
|
{ ...context, provider: 'PaymentMethods' },
|
|
23
20
|
{ featureFlags } // create-render-app effected
|
|
24
21
|
)
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import {
|
|
3
|
-
SubscriptionAndBilling,
|
|
4
|
-
getProviderPropsTimes,
|
|
5
|
-
// getProviderProps,
|
|
6
|
-
} from '@newskit-render/my-account'
|
|
2
|
+
import { SubscriptionAndBilling } from '@newskit-render/my-account'
|
|
7
3
|
import { getAllFeatureFlags } from '@newskit-render/feature-flags' /* cra-effected */
|
|
8
4
|
import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
|
|
5
|
+
import { getProviderPropsUtil } from '../../../helpers/getProviderPropsUtil'
|
|
9
6
|
|
|
10
7
|
const AccountSubscriptionAndBilling = (props) => (
|
|
11
8
|
<SubscriptionAndBilling {...props} />
|
|
@@ -18,7 +15,7 @@ export const getServerSideProps = async (context) => {
|
|
|
18
15
|
/* start cra-effected */
|
|
19
16
|
const featureFlags = await getAllFeatureFlags()
|
|
20
17
|
/* end cra-effected */
|
|
21
|
-
const result = await
|
|
18
|
+
const result = await getProviderPropsUtil(
|
|
22
19
|
{
|
|
23
20
|
...context,
|
|
24
21
|
provider: 'SubscriptionAndBilling',
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import {
|
|
3
|
-
UserHub as UserHubPage,
|
|
4
|
-
getProviderProps,
|
|
5
|
-
} from '@newskit-render/my-account'
|
|
2
|
+
import { UserHub as UserHubPage } from '@newskit-render/my-account'
|
|
6
3
|
import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
|
|
7
4
|
import { getAllFeatureFlags } from '@newskit-render/feature-flags' /* cra-effected */
|
|
5
|
+
import { getProviderPropsUtil } from '../../../helpers/getProviderPropsUtil'
|
|
8
6
|
|
|
9
7
|
const UserHub = (props) => <UserHubPage {...props} />
|
|
10
8
|
|
|
@@ -15,7 +13,7 @@ export const getServerSideProps = async (context) => {
|
|
|
15
13
|
/* start cra-effected */
|
|
16
14
|
const featureFlags = await getAllFeatureFlags()
|
|
17
15
|
/* end cra-effected */
|
|
18
|
-
return
|
|
16
|
+
return getProviderPropsUtil(
|
|
19
17
|
{ ...context, provider: 'PersonalDetails' },
|
|
20
18
|
{ featureFlags } /* cra-effected */
|
|
21
19
|
)
|