@newskit-render/core 1.14.1 → 1.17.4
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/.eslintignore +5 -1
- package/CHANGELOG.md +76 -0
- package/__tests__/pages/[articleSlug].test.tsx +1 -1
- package/__tests__/pages/__snapshots__/home.test.tsx.snap +1 -1
- package/__tests__/pages/home.test.tsx +1 -0
- package/components/article/__tests__/__snapshots__/index.test.tsx.snap +1 -1
- package/components/header/index.test.tsx +1 -1
- package/components/header/index.tsx +9 -5
- package/components/section/__tests__/ArticleSlice.test.tsx +32 -24
- package/helpers/a11y.ts +8 -6
- package/helpers/mocks/articleMock.ts +8 -4
- package/helpers/mocks/getRadioPostMock.ts +4 -2
- package/helpers/mocks/getUniversalArticleMock.ts +8 -4
- package/package.json +51 -51
- package/pages/[section]/[articleId]/[articleSlug].tsx +1 -0
- package/pages/[section]/index.tsx +1 -0
- package/pages/_document.tsx +13 -8
- package/pages/index.tsx +1 -0
- package/public/prebid.min.js +1 -0
- package/temp/_document.tsx +1 -1
package/.eslintignore
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,82 @@
|
|
|
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.17.4](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.17.3...@newskit-render/core@1.17.4) (2022-01-27)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **PPDSR-654:** change logo aria-label ([#574](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/574)) ([7562b5f](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/7562b5f5deb4a857881db3d06dfbbeb36e69701f))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [1.17.3](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.17.2...@newskit-render/core@1.17.3) (2022-01-27)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @newskit-render/core
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [1.17.2](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.17.1...@newskit-render/core@1.17.2) (2022-01-27)
|
|
26
|
+
|
|
27
|
+
**Note:** Version bump only for package @newskit-render/core
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## [1.17.1](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.17.0...@newskit-render/core@1.17.1) (2022-01-25)
|
|
34
|
+
|
|
35
|
+
**Note:** Version bump only for package @newskit-render/core
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
# [1.17.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.16.0...@newskit-render/core@1.17.0) (2022-01-25)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### Features
|
|
45
|
+
|
|
46
|
+
* **PPDSR-618:** Fix lint errors when cra is scaffold ([#568](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/568)) ([a9e176a](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/a9e176a5f6f944eb8755624ebb5c692a86b2207d))
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
# [1.16.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.15.0...@newskit-render/core@1.16.0) (2022-01-25)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
### Features
|
|
56
|
+
|
|
57
|
+
* **PPDSR-566:** remove carrot from dependencies ([#572](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/572)) ([a00f25a](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/a00f25a871f023b6008fe06a1391e83328d3ad58))
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
# [1.15.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.14.2...@newskit-render/core@1.15.0) (2022-01-25)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
### Features
|
|
67
|
+
|
|
68
|
+
* **PPDSR-638:** Remove ads from Account/Checkout ([#570](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/570)) ([03400f6](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/03400f6cf4bd63a54c5c6720b8a12e120d30bbff))
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
## [1.14.2](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.14.1...@newskit-render/core@1.14.2) (2022-01-24)
|
|
75
|
+
|
|
76
|
+
**Note:** Version bump only for package @newskit-render/core
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
6
82
|
## [1.14.1](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.14.0...@newskit-render/core@1.14.1) (2022-01-20)
|
|
7
83
|
|
|
8
84
|
**Note:** Version bump only for package @newskit-render/core
|
|
@@ -138,7 +138,7 @@ describe('Article', () => {
|
|
|
138
138
|
req: { headers: { cookie: 'some-cookie' } },
|
|
139
139
|
res: { setHeader: setHeaderMock },
|
|
140
140
|
})
|
|
141
|
-
expect(response).toEqual({ props: { ...props } })
|
|
141
|
+
expect(response).toEqual({ props: { ...props, showAds: true } })
|
|
142
142
|
expect(setHeaderMock).toHaveBeenCalledWith(
|
|
143
143
|
'Cache-Control',
|
|
144
144
|
'public, s-maxage=10, stale-while-revalidate=59'
|
|
@@ -37,7 +37,7 @@ describe('Header tests', () => {
|
|
|
37
37
|
|
|
38
38
|
test('render links', () => {
|
|
39
39
|
const { getByLabelText } = renderWithTheme(Header)
|
|
40
|
-
expect(getByLabelText('
|
|
40
|
+
expect(getByLabelText('Logo Link')).toHaveAttribute('href', '/')
|
|
41
41
|
expect(getByLabelText('Section One Link')).toHaveAttribute(
|
|
42
42
|
'href',
|
|
43
43
|
'/section-one'
|
|
@@ -54,21 +54,25 @@ const StyledHeader = styled.div`
|
|
|
54
54
|
const pastDueBanner = {
|
|
55
55
|
firstNotice: {
|
|
56
56
|
title: "We haven't been able to take payment",
|
|
57
|
-
text:
|
|
57
|
+
text:
|
|
58
|
+
'You may need to update your payment details to keep your subscription.',
|
|
58
59
|
button: 'Update payment details',
|
|
59
60
|
},
|
|
60
61
|
secondNotice: {
|
|
61
62
|
title: 'Act now to keep your subscription',
|
|
62
|
-
text:
|
|
63
|
+
text:
|
|
64
|
+
'We’ve tried several times, but haven’t been able to take payment. Please update your payment details to keep your subscription.',
|
|
63
65
|
button: 'Update payment details',
|
|
64
66
|
},
|
|
65
67
|
terminated: {
|
|
66
68
|
title: 'Your subscription has been terminated',
|
|
67
|
-
text:
|
|
69
|
+
text:
|
|
70
|
+
'We didn’t receive payment for your subscription. To reactivate it, please call 0800 018 5177.',
|
|
68
71
|
},
|
|
69
72
|
cancelled: {
|
|
70
73
|
title: 'Your subscription has been cancelled.',
|
|
71
|
-
text:
|
|
74
|
+
text:
|
|
75
|
+
'You’ll no longer have access to subscription benefits. To re-activate call 0800 555 1234.',
|
|
72
76
|
},
|
|
73
77
|
treshold: {
|
|
74
78
|
firstNotice: 26,
|
|
@@ -184,7 +188,7 @@ const Header: React.FC<{ user: UserData }> = ({ user }) => {
|
|
|
184
188
|
type="standalone"
|
|
185
189
|
overrides={{ stylePreset: 'linkStandaloneInverse' }}
|
|
186
190
|
href="/"
|
|
187
|
-
aria-label="
|
|
191
|
+
aria-label="Logo Link"
|
|
188
192
|
>
|
|
189
193
|
<Visible md lg xl>
|
|
190
194
|
<NewsKitLogoFull color="white" size="sizing120" />
|
|
@@ -34,18 +34,22 @@ describe('ArticleSlice', () => {
|
|
|
34
34
|
})
|
|
35
35
|
|
|
36
36
|
test('Handle SECONDARY_4 article-block Index Page', () => {
|
|
37
|
-
const {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
37
|
+
const {
|
|
38
|
+
getByTestId,
|
|
39
|
+
getAllByTestId,
|
|
40
|
+
getAllByRole,
|
|
41
|
+
queryByTestId,
|
|
42
|
+
} = renderWithTheme(SectionContext.Provider, {
|
|
43
|
+
value: {
|
|
44
|
+
isIndexPage: true,
|
|
45
|
+
},
|
|
46
|
+
children: (
|
|
47
|
+
<ArticleSlice
|
|
48
|
+
slice={getPageMock.page.body[0].children[1]}
|
|
49
|
+
collection={getPageMock.page.body[0]}
|
|
50
|
+
/>
|
|
51
|
+
),
|
|
52
|
+
})
|
|
49
53
|
expect(queryByTestId('SectionTitleBar')).not.toBeInTheDocument()
|
|
50
54
|
expect(getByTestId('SECONDARY_4-Grid')).toBeInTheDocument()
|
|
51
55
|
expect(getAllByTestId(/titleTeaserVertical-/).length).toEqual(4)
|
|
@@ -67,18 +71,22 @@ describe('ArticleSlice', () => {
|
|
|
67
71
|
})
|
|
68
72
|
|
|
69
73
|
test('Handle SECONDARY_4_ODD article-block Index Page', () => {
|
|
70
|
-
const {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
74
|
+
const {
|
|
75
|
+
getByTestId,
|
|
76
|
+
getAllByTestId,
|
|
77
|
+
getAllByRole,
|
|
78
|
+
queryByTestId,
|
|
79
|
+
} = renderWithTheme(SectionContext.Provider, {
|
|
80
|
+
value: {
|
|
81
|
+
isIndexPage: true,
|
|
82
|
+
},
|
|
83
|
+
children: (
|
|
84
|
+
<ArticleSlice
|
|
85
|
+
slice={getPageMock.page.body[0].children[5]}
|
|
86
|
+
collection={getPageMock.page.body[0]}
|
|
87
|
+
/>
|
|
88
|
+
),
|
|
89
|
+
})
|
|
82
90
|
expect(getByTestId('SectionTitleBar')).toBeInTheDocument()
|
|
83
91
|
expect(queryByTestId('addTopSpace')).toBeInTheDocument()
|
|
84
92
|
expect(getByTestId('SECONDARY_4_ODD-Grid')).toBeInTheDocument()
|
package/helpers/a11y.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
export const handleEnterKeyPress =
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
export const handleEnterKeyPress = (onClick: () => void) => ({
|
|
2
|
+
key,
|
|
3
|
+
}: {
|
|
4
|
+
key: string
|
|
5
|
+
}) => {
|
|
6
|
+
if (key === 'Enter') {
|
|
7
|
+
onClick()
|
|
7
8
|
}
|
|
9
|
+
}
|
|
@@ -26,25 +26,29 @@ export const relatedArticles = [
|
|
|
26
26
|
{
|
|
27
27
|
title: 'Prince Harry',
|
|
28
28
|
tag: 'NEWS',
|
|
29
|
-
text:
|
|
29
|
+
text:
|
|
30
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut a sodales leo. Cras egestas nisl libero, vitae viverra justo gravida quis.',
|
|
30
31
|
href: imagePlaceholderHref('70x50'),
|
|
31
32
|
},
|
|
32
33
|
{
|
|
33
34
|
title: 'Meghan Markle',
|
|
34
35
|
tag: 'SPORT',
|
|
35
|
-
text:
|
|
36
|
+
text:
|
|
37
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut a sodales leo. Cras egestas nisl libero, vitae viverra justo gravida quis.',
|
|
36
38
|
href: imagePlaceholderHref('70x50'),
|
|
37
39
|
},
|
|
38
40
|
{
|
|
39
41
|
title: 'Royal Family',
|
|
40
42
|
tag: 'CULTURE',
|
|
41
|
-
text:
|
|
43
|
+
text:
|
|
44
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut a sodales leo. Cras egestas nisl libero, vitae viverra justo gravida quis.',
|
|
42
45
|
href: imagePlaceholderHref('70x50'),
|
|
43
46
|
},
|
|
44
47
|
{
|
|
45
48
|
title: 'Royal Family',
|
|
46
49
|
tag: 'CORONAVIRUS',
|
|
47
|
-
text:
|
|
50
|
+
text:
|
|
51
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut a sodales leo. Cras egestas nisl libero, vitae viverra justo gravida quis.',
|
|
48
52
|
href: imagePlaceholderHref('70x50'),
|
|
49
53
|
},
|
|
50
54
|
]
|
|
@@ -29,7 +29,8 @@ export default [
|
|
|
29
29
|
italic: false,
|
|
30
30
|
underline: false,
|
|
31
31
|
monospace: false,
|
|
32
|
-
text:
|
|
32
|
+
text:
|
|
33
|
+
'Proin eget tortor risus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; ',
|
|
33
34
|
},
|
|
34
35
|
{
|
|
35
36
|
type: 'text',
|
|
@@ -45,7 +46,8 @@ export default [
|
|
|
45
46
|
italic: false,
|
|
46
47
|
underline: false,
|
|
47
48
|
monospace: false,
|
|
48
|
-
text:
|
|
49
|
+
text:
|
|
50
|
+
', auctor sit amet aliquam vel, ullamcorper sit amet ligula. Donec rutrum congue leo eget malesuada. Proin eget tortor risus. Sed porttitor lectus nibh. Donec sollicitudin molestie malesuada.',
|
|
49
51
|
},
|
|
50
52
|
],
|
|
51
53
|
},
|
|
@@ -51,17 +51,21 @@ export default [
|
|
|
51
51
|
summary: {
|
|
52
52
|
children: [
|
|
53
53
|
{
|
|
54
|
-
text:
|
|
54
|
+
text:
|
|
55
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis eget lorem vel nunc feugiat malesuada ut ac nisi. Morbi odio ipsum, dignissim nec turpis vel, laoreet condimentum tortor. Duis laoreet tincidunt ullamcorper.',
|
|
55
56
|
},
|
|
56
57
|
{
|
|
57
|
-
text:
|
|
58
|
+
text:
|
|
59
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis eget lorem vel nunc feugiat malesuada ut ac nisi. Morbi odio ipsum, dignissim nec turpis vel, laoreet condimentum tortor. Duis laoreet tincidunt ullamcorper.',
|
|
58
60
|
},
|
|
59
61
|
{
|
|
60
62
|
url: 'http://this-is-a-url/',
|
|
61
|
-
text:
|
|
63
|
+
text:
|
|
64
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis eget lorem vel nunc feugiat malesuada ut ac nisi. Morbi odio ipsum, dignissim nec turpis vel, laoreet condimentum tortor. Duis laoreet tincidunt ullamcorper.',
|
|
62
65
|
},
|
|
63
66
|
{
|
|
64
|
-
text:
|
|
67
|
+
text:
|
|
68
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis eget lorem vel nunc feugiat malesuada ut ac nisi. Morbi odio ipsum, dignissim nec turpis vel, laoreet condimentum tortor. Duis laoreet tincidunt ullamcorper.',
|
|
65
69
|
},
|
|
66
70
|
],
|
|
67
71
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@newskit-render/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.17.4",
|
|
4
4
|
"description": "Newskit Render - Core package",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -30,63 +30,63 @@
|
|
|
30
30
|
"analyze": "ANALYZE=true next build"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@apollo/client": "
|
|
34
|
-
"@newskit-render/api": "^0.
|
|
35
|
-
"@newskit-render/auth": "^0.
|
|
36
|
-
"@newskit-render/checkout": "^0.
|
|
37
|
-
"@newskit-render/my-account": "^0.
|
|
38
|
-
"@newskit-render/shared-components": "^0.
|
|
39
|
-
"@newskit-render/sitemap": "^0.
|
|
40
|
-
"@newskit-render/validation": "^0.
|
|
41
|
-
"cross-fetch": "
|
|
42
|
-
"graphql": "
|
|
43
|
-
"newrelic": "
|
|
33
|
+
"@apollo/client": "3.4.16",
|
|
34
|
+
"@newskit-render/api": "^0.10.1",
|
|
35
|
+
"@newskit-render/auth": "^0.26.1",
|
|
36
|
+
"@newskit-render/checkout": "^0.16.1",
|
|
37
|
+
"@newskit-render/my-account": "^0.126.1",
|
|
38
|
+
"@newskit-render/shared-components": "^0.27.1",
|
|
39
|
+
"@newskit-render/sitemap": "^0.29.1",
|
|
40
|
+
"@newskit-render/validation": "^0.31.1",
|
|
41
|
+
"cross-fetch": "3.1.5",
|
|
42
|
+
"graphql": "15.6.0",
|
|
43
|
+
"newrelic": "7.1.0",
|
|
44
44
|
"newskit": "4.3.1",
|
|
45
|
-
"next": "
|
|
46
|
-
"react": "
|
|
47
|
-
"react-dom": "
|
|
48
|
-
"react-helmet": "
|
|
45
|
+
"next": "12.0.8",
|
|
46
|
+
"react": "17.0.2",
|
|
47
|
+
"react-dom": "17.0.2",
|
|
48
|
+
"react-helmet": "6.1.0",
|
|
49
49
|
"react-hook-form": "7.8.4"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@apollo/react-testing": "
|
|
53
|
-
"@emotion/jest": "
|
|
54
|
-
"@next/bundle-analyzer": "
|
|
55
|
-
"@pact-foundation/pact": "
|
|
56
|
-
"@testing-library/jest-dom": "
|
|
57
|
-
"@testing-library/react": "
|
|
58
|
-
"@types/newrelic": "
|
|
59
|
-
"@types/react": "
|
|
60
|
-
"@types/react-helmet": "
|
|
61
|
-
"@typescript-eslint/eslint-plugin": "
|
|
62
|
-
"@typescript-eslint/parser": "
|
|
63
|
-
"babel-jest": "
|
|
52
|
+
"@apollo/react-testing": "4.0.0",
|
|
53
|
+
"@emotion/jest": "11.3.0",
|
|
54
|
+
"@next/bundle-analyzer": "12.0.8",
|
|
55
|
+
"@pact-foundation/pact": "9.12.1",
|
|
56
|
+
"@testing-library/jest-dom": "5.11.4",
|
|
57
|
+
"@testing-library/react": "11.0.2",
|
|
58
|
+
"@types/newrelic": "7.0.0",
|
|
59
|
+
"@types/react": "17.0.2",
|
|
60
|
+
"@types/react-helmet": "6.1.0",
|
|
61
|
+
"@typescript-eslint/eslint-plugin": "3.7.1",
|
|
62
|
+
"@typescript-eslint/parser": "3.7.1",
|
|
63
|
+
"babel-jest": "26.3.0",
|
|
64
64
|
"cypress": "9.0.0",
|
|
65
|
-
"eslint": "
|
|
66
|
-
"eslint-config-airbnb": "
|
|
67
|
-
"eslint-config-airbnb-typescript": "
|
|
68
|
-
"eslint-config-prettier": "
|
|
69
|
-
"eslint-config-react-app": "
|
|
70
|
-
"eslint-import-resolver-typescript": "
|
|
71
|
-
"eslint-loader": "
|
|
72
|
-
"eslint-plugin-cypress": "
|
|
73
|
-
"eslint-plugin-flowtype": "
|
|
74
|
-
"eslint-plugin-import": "
|
|
65
|
+
"eslint": "6.6.0",
|
|
66
|
+
"eslint-config-airbnb": "18.2.0",
|
|
67
|
+
"eslint-config-airbnb-typescript": "9.0.0",
|
|
68
|
+
"eslint-config-prettier": "6.11.0",
|
|
69
|
+
"eslint-config-react-app": "5.2.1",
|
|
70
|
+
"eslint-import-resolver-typescript": "2.0.0",
|
|
71
|
+
"eslint-loader": "4.0.2",
|
|
72
|
+
"eslint-plugin-cypress": "2.11.2",
|
|
73
|
+
"eslint-plugin-flowtype": "5.2.0",
|
|
74
|
+
"eslint-plugin-import": "2.22.1",
|
|
75
75
|
"eslint-plugin-jsx-a11y": "6.2.3",
|
|
76
|
-
"eslint-plugin-prettier": "
|
|
76
|
+
"eslint-plugin-prettier": "3.1.4",
|
|
77
77
|
"eslint-plugin-react": "7.19.0",
|
|
78
|
-
"eslint-plugin-react-hooks": "
|
|
79
|
-
"jest": "
|
|
80
|
-
"jest-junit": "
|
|
81
|
-
"jest-watch-typeahead": "
|
|
82
|
-
"lint-staged": "
|
|
83
|
-
"next-transpile-modules": "
|
|
84
|
-
"prettier": "
|
|
85
|
-
"prettier-eslint": "
|
|
86
|
-
"prettier-eslint-cli": "
|
|
87
|
-
"ts-jest": "
|
|
88
|
-
"typescript": "
|
|
89
|
-
"wait-on": "
|
|
78
|
+
"eslint-plugin-react-hooks": "1.6.1",
|
|
79
|
+
"jest": "27.2.4",
|
|
80
|
+
"jest-junit": "12.0.0",
|
|
81
|
+
"jest-watch-typeahead": "0.6.3",
|
|
82
|
+
"lint-staged": "12.1.7",
|
|
83
|
+
"next-transpile-modules": "8.0.0",
|
|
84
|
+
"prettier": "2.0.5",
|
|
85
|
+
"prettier-eslint": "11.0.0",
|
|
86
|
+
"prettier-eslint-cli": "5.0.0",
|
|
87
|
+
"ts-jest": "27.0.5",
|
|
88
|
+
"typescript": "4.4.3",
|
|
89
|
+
"wait-on": "5.3.0"
|
|
90
90
|
},
|
|
91
91
|
"precommit": [
|
|
92
92
|
"precommit"
|
package/pages/_document.tsx
CHANGED
|
@@ -32,6 +32,7 @@ export default class MyDocument extends Document {
|
|
|
32
32
|
|
|
33
33
|
render() {
|
|
34
34
|
const helmet = Helmet.rewind()
|
|
35
|
+
const { showAds } = this.props.__NEXT_DATA__.props.pageProps
|
|
35
36
|
return (
|
|
36
37
|
<Html lang="en">
|
|
37
38
|
<Head>
|
|
@@ -62,14 +63,18 @@ export default class MyDocument extends Document {
|
|
|
62
63
|
/>
|
|
63
64
|
)}
|
|
64
65
|
<meta name="robots" content="noindex" />
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
66
|
+
{showAds && (
|
|
67
|
+
<>
|
|
68
|
+
<script
|
|
69
|
+
type="text/javascript"
|
|
70
|
+
src="https://ads.newskit.co.uk/prebid.newskit.min.js"
|
|
71
|
+
/>
|
|
72
|
+
<script
|
|
73
|
+
type="text/javascript"
|
|
74
|
+
src="https://ads.newskit.co.uk/ads.newskit.min.js"
|
|
75
|
+
/>
|
|
76
|
+
</>
|
|
77
|
+
)}
|
|
73
78
|
</Head>
|
|
74
79
|
<body>
|
|
75
80
|
{TEALIUM_ACCOUNT_ID && (
|
package/pages/index.tsx
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
console.log('Please speak to commercial to get a link to your ad library CDN link')
|