@newskit-render/core 4.35.0-alpha.0 → 4.35.1-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.
- package/CHANGELOG.md +8 -0
- package/helpers/getProviderPropsUtil.ts +17 -0
- package/package.json +2 -2
- package/pages/account/add/[field].tsx +3 -6
- 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 -2
- package/pages/account/family/index.tsx +3 -2
- package/pages/account/holiday-stop/index.tsx +3 -2
- package/pages/account/holiday-stop/previous-holiday-stops.tsx +3 -2
- package/pages/account/holiday-stop/upcoming-holiday-stops.tsx +3 -2
- package/pages/account/index.tsx +3 -2
- package/pages/account/newsletters/index.tsx +3 -2
- package/pages/account/newsletters-and-alerts/index.tsx +3 -5
- package/pages/account/payment/[paymentMethod].tsx +2 -2
- package/pages/account/payment/index.tsx +3 -2
- package/pages/account/payment-methods/index.tsx +3 -2
- package/pages/account/subscription-and-billing/index.tsx +3 -5
- package/pages/account/user-hub/index.tsx +3 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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.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)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @newskit-render/core
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [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)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @newskit-render/core
|
|
@@ -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": "4.35.
|
|
3
|
+
"version": "4.35.1-alpha.0",
|
|
4
4
|
"description": "Newskit Render - Core package",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@newskit-render/checkout": "^3.10.15",
|
|
48
48
|
"@newskit-render/feature-flags": "^1.10.0",
|
|
49
49
|
"@newskit-render/feed": "^1.8.13",
|
|
50
|
-
"@newskit-render/my-account": "^7.72.0
|
|
50
|
+
"@newskit-render/my-account": "^7.72.0",
|
|
51
51
|
"@newskit-render/shared-components": "^4.32.2",
|
|
52
52
|
"@newskit-render/standalone-components": "^3.22.3",
|
|
53
53
|
"@newskit-render/validation": "^1.17.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
|
-
getProviderProps,
|
|
7
|
-
} from '@newskit-render/my-account'
|
|
3
|
+
import { AddField, addComponentMap } from '@newskit-render/my-account'
|
|
8
4
|
import validation from '../../../validation'
|
|
9
5
|
import { DynamicPage } from '@newskit-render/my-account'
|
|
10
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
|
|
@@ -34,7 +31,7 @@ export const getServerSideProps = async (context) => {
|
|
|
34
31
|
}
|
|
35
32
|
|
|
36
33
|
const featureFlags = await getAllFeatureFlags()
|
|
37
|
-
const providerProps = (await
|
|
34
|
+
const providerProps = (await getProviderPropsUtil(
|
|
38
35
|
{ ...context, provider: 'AddField' },
|
|
39
36
|
{ featureFlags } /* cra-effected */
|
|
40
37
|
)) as unknown as { props: { data: { type: string } } }
|
|
@@ -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,12 +2,12 @@ import React from 'react'
|
|
|
2
2
|
import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
|
|
3
3
|
import {
|
|
4
4
|
EditField,
|
|
5
|
-
getProviderProps,
|
|
6
5
|
editComponentMap,
|
|
7
6
|
DynamicPage,
|
|
8
7
|
} from '@newskit-render/my-account'
|
|
9
8
|
import { getAllFeatureFlags } from '@newskit-render/feature-flags' /* cra-effected */
|
|
10
9
|
import validation from '../../../validation'
|
|
10
|
+
import { getProviderPropsUtil } from '../../../helpers/getProviderPropsUtil'
|
|
11
11
|
|
|
12
12
|
const AccountEditField = (props) => (
|
|
13
13
|
<DynamicPage
|
|
@@ -38,7 +38,7 @@ export const getServerSideProps = async (context) => {
|
|
|
38
38
|
const featureFlags = await getAllFeatureFlags()
|
|
39
39
|
/* end cra-effected */
|
|
40
40
|
|
|
41
|
-
return
|
|
41
|
+
return getProviderPropsUtil(
|
|
42
42
|
{ ...context, provider: 'EditField' },
|
|
43
43
|
{ featureFlags } /* cra-effected */
|
|
44
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,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
|
{
|
|
17
18
|
...context,
|
|
18
19
|
provider: 'GroupAccounts',
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { HolidayStop } 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 AccountHolidayStop = (props) => <HolidayStop {...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: 'HolidayStop' },
|
|
17
18
|
{ featureFlags } /* cra-effected */
|
|
18
19
|
)
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { HolidayStopList } from '@newskit-render/my-account'
|
|
3
3
|
import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
|
|
4
4
|
import { holidayStopListContextOverrides } from '../../../context/app-context/holidayStopListContextOverrides'
|
|
5
|
+
import { getProviderPropsUtil } from '../../../helpers/getProviderPropsUtil'
|
|
5
6
|
|
|
6
7
|
const AccountPreviousHolidayStops = (props) => (
|
|
7
8
|
<HolidayStopList
|
|
@@ -15,5 +16,5 @@ export default AccountPreviousHolidayStops
|
|
|
15
16
|
|
|
16
17
|
export const getServerSideProps = async (context) => {
|
|
17
18
|
replaceConsoleAndSetTransactionName('Account: Previous Holiday Stops')
|
|
18
|
-
return
|
|
19
|
+
return getProviderPropsUtil({ ...context, provider: 'HolidayStop' })
|
|
19
20
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { HolidayStopList } from '@newskit-render/my-account'
|
|
3
3
|
import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
|
|
4
4
|
import { holidayStopListContextOverrides } from '../../../context/app-context/holidayStopListContextOverrides'
|
|
5
|
+
import { getProviderPropsUtil } from '../../../helpers/getProviderPropsUtil'
|
|
5
6
|
|
|
6
7
|
const AccountUpcomingHolidayStops = (props) => (
|
|
7
8
|
<HolidayStopList
|
|
@@ -15,5 +16,5 @@ export default AccountUpcomingHolidayStops
|
|
|
15
16
|
|
|
16
17
|
export const getServerSideProps = async (context) => {
|
|
17
18
|
replaceConsoleAndSetTransactionName('Account: Upcoming Holiday Stops')
|
|
18
|
-
return
|
|
19
|
+
return getProviderPropsUtil({ ...context, provider: 'HolidayStop' })
|
|
19
20
|
}
|
package/pages/account/index.tsx
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { PersonalDetails
|
|
2
|
+
import { PersonalDetails } from '@newskit-render/my-account'
|
|
3
3
|
import { getAllFeatureFlags } from '@newskit-render/feature-flags' /* cra-effected */
|
|
4
4
|
import { AccountDropdown } from '../../components/AccountDropdown' /* cra-disabled */
|
|
5
5
|
import { replaceConsoleAndSetTransactionName } from '../../helpers/logger'
|
|
6
|
+
import { getProviderPropsUtil } from '../../helpers/getProviderPropsUtil'
|
|
6
7
|
|
|
7
8
|
const AccountPersonalDetails = (props) => {
|
|
8
9
|
return (
|
|
@@ -24,7 +25,7 @@ export const getServerSideProps = async (context) => {
|
|
|
24
25
|
|
|
25
26
|
const featureFlags = await getAllFeatureFlags()
|
|
26
27
|
|
|
27
|
-
return
|
|
28
|
+
return getProviderPropsUtil(
|
|
28
29
|
{ ...context, provider: 'PersonalDetails' },
|
|
29
30
|
{ featureFlags } /* cra-effected */
|
|
30
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,10 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import {
|
|
3
|
-
NewslettersAndAlerts,
|
|
4
|
-
getProviderProps,
|
|
5
|
-
} from '@newskit-render/my-account'
|
|
2
|
+
import { NewslettersAndAlerts } 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 AccountNewslettersAndAlerts = (props) => (
|
|
10
8
|
<NewslettersAndAlerts {...props} />
|
|
@@ -17,7 +15,7 @@ export const getServerSideProps = async (context) => {
|
|
|
17
15
|
/* start cra-effected */
|
|
18
16
|
const featureFlags = await getAllFeatureFlags()
|
|
19
17
|
/* end cra-effected */
|
|
20
|
-
return
|
|
18
|
+
return getProviderPropsUtil(
|
|
21
19
|
{ ...context, provider: 'NewslettersAndAlerts' },
|
|
22
20
|
{ featureFlags } /* cra-effected */
|
|
23
21
|
)
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
|
|
3
3
|
import {
|
|
4
|
-
getProviderProps,
|
|
5
4
|
Payment,
|
|
6
5
|
paymentMethodsMap,
|
|
7
6
|
DynamicPage,
|
|
8
7
|
} from '@newskit-render/my-account'
|
|
9
8
|
import { getAllFeatureFlags } from '@newskit-render/feature-flags' /* cra-effected */
|
|
9
|
+
import { getProviderPropsUtil } from '../../../helpers/getProviderPropsUtil'
|
|
10
10
|
|
|
11
11
|
const PaymentPage = (props) => {
|
|
12
12
|
return (
|
|
@@ -27,7 +27,7 @@ export const getServerSideProps = async (context) => {
|
|
|
27
27
|
const featureFlags = await getAllFeatureFlags()
|
|
28
28
|
/* end cra-effected */
|
|
29
29
|
|
|
30
|
-
return
|
|
30
|
+
return getProviderPropsUtil(
|
|
31
31
|
{
|
|
32
32
|
...context,
|
|
33
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,8 +1,9 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { PaymentMethods } from '@newskit-render/my-account'
|
|
3
3
|
import { getAllFeatureFlags } from '@newskit-render/feature-flags' // create-render-app effected
|
|
4
4
|
import { paymentMethodContext } from '../../../context/app-context/paymentMethodContext'
|
|
5
5
|
import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
|
|
6
|
+
import { getProviderPropsUtil } from '../../../helpers/getProviderPropsUtil'
|
|
6
7
|
|
|
7
8
|
const AccountPaymentMethods = (props) => (
|
|
8
9
|
<PaymentMethods {...props} context={paymentMethodContext} />
|
|
@@ -14,7 +15,7 @@ export const getServerSideProps = async (context) => {
|
|
|
14
15
|
replaceConsoleAndSetTransactionName('Account: Payment Methods')
|
|
15
16
|
const featureFlags = await getAllFeatureFlags()
|
|
16
17
|
// create-render-app effected
|
|
17
|
-
return
|
|
18
|
+
return getProviderPropsUtil(
|
|
18
19
|
{ ...context, provider: 'PaymentMethods' },
|
|
19
20
|
{ featureFlags } // create-render-app effected
|
|
20
21
|
)
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import {
|
|
3
|
-
SubscriptionAndBilling,
|
|
4
|
-
getProviderProps,
|
|
5
|
-
} from '@newskit-render/my-account'
|
|
2
|
+
import { SubscriptionAndBilling } from '@newskit-render/my-account'
|
|
6
3
|
import { getAllFeatureFlags } from '@newskit-render/feature-flags' /* cra-effected */
|
|
7
4
|
import { replaceConsoleAndSetTransactionName } from '../../../helpers/logger'
|
|
5
|
+
import { getProviderPropsUtil } from '../../../helpers/getProviderPropsUtil'
|
|
8
6
|
|
|
9
7
|
const AccountSubscriptionAndBilling = (props) => (
|
|
10
8
|
<SubscriptionAndBilling {...props} />
|
|
@@ -17,7 +15,7 @@ export const getServerSideProps = async (context) => {
|
|
|
17
15
|
/* start cra-effected */
|
|
18
16
|
const featureFlags = await getAllFeatureFlags()
|
|
19
17
|
/* end cra-effected */
|
|
20
|
-
const result = await
|
|
18
|
+
const result = await getProviderPropsUtil(
|
|
21
19
|
{
|
|
22
20
|
...context,
|
|
23
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
|
)
|