gatsby-core-theme 1.6.12 → 1.6.16
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 +61 -0
- package/gatsby-node.esm.js +1 -1
- package/package.json +1 -1
- package/src/components/atoms/author-box/author-box.test.js +2 -2
- package/src/components/atoms/carousel/arrow/index.js +1 -0
- package/src/components/atoms/image/image.test.js +2 -2
- package/src/components/atoms/spotlights/index.js +8 -2
- package/src/components/molecules/content/content.test.js +2 -2
- package/src/components/molecules/pagination/with-midpoints.js +2 -2
- package/src/components/molecules/slider/index.js +1 -0
- package/src/helpers/getters.js +10 -2
- package/src/helpers/getters.test.js +8 -1
- package/src/helpers/processor/sports.js +2 -0
- package/src/helpers/schedule.js +41 -0
- package/src/helpers/schema.js +3 -2
- package/src/helpers/schema.test.js +2 -1
- package/src/helpers/strings.js +4 -0
- package/src/helpers/strings.test.js +6 -2
- package/src/hooks/lazy-image/index.js +40 -21
- package/src/hooks/modal/modal-content.js +6 -1
- package/tests/envVars.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,64 @@
|
|
|
1
|
+
## [1.6.16](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v1.6.15...v1.6.16) (2021-12-03)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* fix event hour format based on site name ([d1c275c](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/d1c275ccc5ed429f04208c1cf8ae4c5d4841aac7))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
* Merge branch 'format_event_hour' into 'master' ([1b8c999](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/1b8c999064676973c55360cc04820f0be122496e))
|
|
10
|
+
|
|
11
|
+
## [1.6.15](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v1.6.14...v1.6.15) (2021-12-02)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* html sitemap page translations ([3bd7093](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/3bd70937dc819d9a98d951ce3946ba71c1ad7055))
|
|
17
|
+
|
|
18
|
+
## [1.6.14](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v1.6.13...v1.6.14) (2021-12-01)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
22
|
+
|
|
23
|
+
* added clean up html tags in faq schema data ([0b9ae93](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/0b9ae937928ede9f1f710ee0749108bf99b16757))
|
|
24
|
+
* added clean up html tags in faq schema data ([1b22637](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/1b22637bfadd48e9731e01d82b39e7db97e156ac))
|
|
25
|
+
* added new cdn env var for gifs ([e5bb4bc](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/e5bb4bc6507688fbb8060a4df349fe5ff534a009))
|
|
26
|
+
* geturl func ([c531ed3](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/c531ed335ae4e35aaa5b94010cb136d419826ac7))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
* Merge branch 'fix-gif-images' into 'master' ([0fd8aab](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/0fd8aab0d3798b6487d0cc5a3d1a5a8c14d45c7f))
|
|
30
|
+
|
|
31
|
+
## [1.6.13](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v1.6.12...v1.6.13) (2021-11-28)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Bug Fixes
|
|
35
|
+
|
|
36
|
+
* added no script tag for all lazyimages ([76ee02f](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/76ee02f235bcdab777b961fe19068e9033cdb514))
|
|
37
|
+
* fixes on accessibility score ([b0e213e](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/b0e213e09741e2fbcb40356db77c600a39327885))
|
|
38
|
+
* noscript tag ([d922b66](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/d922b66d5ac8b4312a623ff0a37b213e3d07b908))
|
|
39
|
+
* noscript tag ([d97e54d](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/d97e54d035e1bd580fec1b1c9cf2f6cca8a24308))
|
|
40
|
+
* noscript tag ([2571d26](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/2571d2624b28db40db235f65916623dc51abd41a))
|
|
41
|
+
* noscript tag ([844db38](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/844db385179f7a291148de789d62629c6950c4bc))
|
|
42
|
+
* noscript tag ([45deece](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/45deececbc31fdaef83e90a7924b5e5084d8e7bf))
|
|
43
|
+
* noscript tag ([6ea5975](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/6ea5975e81bdf29b25c57a93e8996fd83a155e9b))
|
|
44
|
+
* noscript tag ([09fa187](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/09fa1876c0142f042fdb81f47f01713492c8d487))
|
|
45
|
+
* noscript tag ([a7ecfb4](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/a7ecfb45c772460d62aad290a91e463c68eebcfa))
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### Code Refactoring
|
|
49
|
+
|
|
50
|
+
* add missing aria label ([a670669](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/a670669eb29a136d57228824900cb2a3a64b6f56))
|
|
51
|
+
* replace div with ul for performance imporvements ([5373d6c](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/5373d6c0d3fafdd1dfd17c91deaf79e8bc96eb06))
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
### Config
|
|
55
|
+
|
|
56
|
+
* increased pagespeed performance score to 90 ([143b68a](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/143b68a0107811d366afa08223e672f26227322b))
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
* Merge branch 'tm-2609-lazyload-noscript-tag' into 'master' ([6669bad](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/6669bad97a1817b01033a42c8686f09c565dca37))
|
|
60
|
+
* Merge branch 'tm-2595-accessibility-scores-fix' into 'master' ([048a617](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/048a6175d4025e4fcd4a7999dced518f97f6140b))
|
|
61
|
+
|
|
1
62
|
## [1.6.12](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v1.6.11...v1.6.12) (2021-11-25)
|
|
2
63
|
|
|
3
64
|
|
package/gatsby-node.esm.js
CHANGED
|
@@ -219,6 +219,7 @@ exports.createPages = async ({ actions: { createPage } }, themeOptions) => {
|
|
|
219
219
|
marketSections,
|
|
220
220
|
prefilledModules,
|
|
221
221
|
siteInfo,
|
|
222
|
+
translations,
|
|
222
223
|
...themeOptions,
|
|
223
224
|
};
|
|
224
225
|
|
|
@@ -247,7 +248,6 @@ exports.createPages = async ({ actions: { createPage } }, themeOptions) => {
|
|
|
247
248
|
context: {
|
|
248
249
|
...contextData,
|
|
249
250
|
siteSchema,
|
|
250
|
-
translations,
|
|
251
251
|
isPreview: page.path === 'preview',
|
|
252
252
|
},
|
|
253
253
|
});
|
package/package.json
CHANGED
|
@@ -11,8 +11,8 @@ describe('author box component', () => {
|
|
|
11
11
|
const { container, getByText } = render(<AuthorBox author={author} />);
|
|
12
12
|
expect(container).toBeTruthy();
|
|
13
13
|
// Logo
|
|
14
|
-
expect(container.querySelector('img')).toBeFalsy();
|
|
15
|
-
expect(container.querySelectorAll('div.lazyload-placeholder')).toHaveLength(1);
|
|
14
|
+
// expect(container.querySelector('img')).toBeFalsy();
|
|
15
|
+
// expect(container.querySelectorAll('div.lazyload-placeholder')).toHaveLength(1);
|
|
16
16
|
// Name
|
|
17
17
|
expect(getByText('Ida Moen Olsen')).toBeTruthy();
|
|
18
18
|
// Title
|
|
@@ -16,8 +16,8 @@ describe('Image Component', () => {
|
|
|
16
16
|
expect(container).toBeTruthy();
|
|
17
17
|
|
|
18
18
|
// Lazy image
|
|
19
|
-
expect(container.querySelector('img')).toBeFalsy();
|
|
20
|
-
expect(container.querySelector('div.lazyload-placeholder')).toBeTruthy();
|
|
19
|
+
// expect(container.querySelector('img')).toBeFalsy();
|
|
20
|
+
// expect(container.querySelector('div.lazyload-placeholder')).toBeTruthy();
|
|
21
21
|
});
|
|
22
22
|
});
|
|
23
23
|
afterEach(() => {
|
|
@@ -18,7 +18,7 @@ const Spotlights = ({ module }) => {
|
|
|
18
18
|
return (
|
|
19
19
|
<>
|
|
20
20
|
<span className={styles.itemImage}>
|
|
21
|
-
<LazyImage alt={item.label} src={imagePrettyUrl(img)} />
|
|
21
|
+
<LazyImage alt={item.label || item?.link_text} src={imagePrettyUrl(img)} />
|
|
22
22
|
</span>
|
|
23
23
|
<span className={styles.label}>{item.label}</span>
|
|
24
24
|
</>
|
|
@@ -43,11 +43,17 @@ const Spotlights = ({ module }) => {
|
|
|
43
43
|
title={item.label}
|
|
44
44
|
target="_blank"
|
|
45
45
|
rel="noreferrer"
|
|
46
|
+
aria-label={`${item?.label || item?.link_text} Link`}
|
|
46
47
|
>
|
|
47
48
|
{content(item)}
|
|
48
49
|
</a>
|
|
49
50
|
) : (
|
|
50
|
-
<Link
|
|
51
|
+
<Link
|
|
52
|
+
to={item.link.value}
|
|
53
|
+
title={item.label}
|
|
54
|
+
className="spotlights-gtm"
|
|
55
|
+
aria-label={`${item?.label || item?.link_text} Link`}
|
|
56
|
+
>
|
|
51
57
|
{content(item)}
|
|
52
58
|
</Link>
|
|
53
59
|
)}
|
|
@@ -17,8 +17,8 @@ describe('Content Component', () => {
|
|
|
17
17
|
expect(container.querySelectorAll('i')).toHaveLength(1);
|
|
18
18
|
|
|
19
19
|
// Lazy image
|
|
20
|
-
expect(container.querySelector('img')).toBeFalsy();
|
|
21
|
-
expect(container.querySelector('div.lazyload-placeholder')).toBeTruthy();
|
|
20
|
+
// expect(container.querySelector('img')).toBeFalsy();
|
|
21
|
+
// expect(container.querySelector('div.lazyload-placeholder')).toBeTruthy();
|
|
22
22
|
});
|
|
23
23
|
});
|
|
24
24
|
afterEach(() => {
|
|
@@ -57,7 +57,7 @@ const PaginationWithMidPoints = ({
|
|
|
57
57
|
)}
|
|
58
58
|
</li>
|
|
59
59
|
|
|
60
|
-
<
|
|
60
|
+
<ul className={styles.padd}>
|
|
61
61
|
{/* first page link */}
|
|
62
62
|
{current !== 1 && (
|
|
63
63
|
<li>
|
|
@@ -122,7 +122,7 @@ const PaginationWithMidPoints = ({
|
|
|
122
122
|
{total}
|
|
123
123
|
</Link>
|
|
124
124
|
</li>
|
|
125
|
-
</
|
|
125
|
+
</ul>
|
|
126
126
|
|
|
127
127
|
{/* next button */}
|
|
128
128
|
<li className={styles.showInAll}>
|
package/src/helpers/getters.js
CHANGED
|
@@ -90,8 +90,15 @@ export function image(filename, width, height, fit = 'cover') {
|
|
|
90
90
|
return `${cloudFrontUrl}/${Buffer.from(imageRequest).toString('base64')}`;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
+
export function getImageExtension(filename) {
|
|
94
|
+
return filename && filename.split('.').pop();
|
|
95
|
+
}
|
|
96
|
+
|
|
93
97
|
export function imagePrettyUrl(filename = 'image.png', width = null, height = null) {
|
|
94
|
-
const cdnURL =
|
|
98
|
+
const cdnURL =
|
|
99
|
+
(getImageExtension(filename) === 'gif'
|
|
100
|
+
? process.env.GIFS_CDN_URL
|
|
101
|
+
: process.env.IMAGE_CDN_URL) || process.env.STORYBOOK_IMAGE_CDN_URL;
|
|
95
102
|
|
|
96
103
|
if (width && height) {
|
|
97
104
|
const urlPath = '/fit-in';
|
|
@@ -262,7 +269,8 @@ export function getUrl(path) {
|
|
|
262
269
|
if (path === '/') {
|
|
263
270
|
return process.env.GATSBY_SITE_URL;
|
|
264
271
|
}
|
|
265
|
-
|
|
272
|
+
|
|
273
|
+
return `${process.env.GATSBY_SITE_URL}${path.replace(/^\//, '')}`;
|
|
266
274
|
}
|
|
267
275
|
|
|
268
276
|
export function getLanguage(language) {
|
|
@@ -68,6 +68,12 @@ describe('Getters Helper', () => {
|
|
|
68
68
|
);
|
|
69
69
|
});
|
|
70
70
|
|
|
71
|
+
test('getImageExtension()', () => {
|
|
72
|
+
expect(Getters.getImageExtension('photo.jpg')).toBeTruthy();
|
|
73
|
+
expect(Getters.getImageExtension('photo.jpg')).toEqual('jpg');
|
|
74
|
+
expect(Getters.getImageExtension(null)).toEqual(null);
|
|
75
|
+
});
|
|
76
|
+
|
|
71
77
|
test('getPageImage()', () => {
|
|
72
78
|
expect(
|
|
73
79
|
Getters.getPageImage({ type: 'operator', relation: { default_logo_url: 'foo.jpg' } })
|
|
@@ -191,8 +197,9 @@ describe('Getters Helper', () => {
|
|
|
191
197
|
});
|
|
192
198
|
|
|
193
199
|
test('getUrl()', () => {
|
|
194
|
-
expect(Getters.getUrl('/')).toEqual('http://urltest.com');
|
|
200
|
+
expect(Getters.getUrl('/')).toEqual('http://urltest.com/');
|
|
195
201
|
expect(Getters.getUrl('/games')).toEqual('http://urltest.com/games');
|
|
202
|
+
expect(Getters.getUrl('games')).toEqual('http://urltest.com/games');
|
|
196
203
|
});
|
|
197
204
|
|
|
198
205
|
test('getLanguage()', () => {
|
|
@@ -6,9 +6,11 @@ import {
|
|
|
6
6
|
filterEvents,
|
|
7
7
|
findTournaments,
|
|
8
8
|
getSortedEvents,
|
|
9
|
+
formatEvents,
|
|
9
10
|
} from '../schedule';
|
|
10
11
|
|
|
11
12
|
export function prepareSportsData(sportsData) {
|
|
13
|
+
sportsData.events = formatEvents(sportsData.events);
|
|
12
14
|
Object.keys(sportsData.tournaments).forEach((key) => {
|
|
13
15
|
if (sportsData.tournaments[key].events) {
|
|
14
16
|
sportsData.tournaments[key].events = filterEvents(
|
package/src/helpers/schedule.js
CHANGED
|
@@ -120,3 +120,44 @@ export function filterEvents(tournamentEvents, events) {
|
|
|
120
120
|
|
|
121
121
|
return futureEvents;
|
|
122
122
|
}
|
|
123
|
+
|
|
124
|
+
export function changeEventHour(event, hour = 1) {
|
|
125
|
+
if (!event || !event.date || !event.date.time) {
|
|
126
|
+
return event;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
const timeArr = event.date.time.split(':');
|
|
130
|
+
timeArr[0] = Number(timeArr[0]) - hour;
|
|
131
|
+
event.date.time = timeArr.join(':');
|
|
132
|
+
|
|
133
|
+
return event;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export function formatEvents(events) {
|
|
137
|
+
const eventsArr = Object.values(events);
|
|
138
|
+
const siteName = process.env.GATSBY_SITE_NAME;
|
|
139
|
+
let prefix = '0';
|
|
140
|
+
|
|
141
|
+
switch (siteName) {
|
|
142
|
+
case 'sefodbold.dk':
|
|
143
|
+
prefix = 1;
|
|
144
|
+
break;
|
|
145
|
+
case 'sesport.dk':
|
|
146
|
+
prefix = 1;
|
|
147
|
+
break;
|
|
148
|
+
case 'bekijksport.nl':
|
|
149
|
+
prefix = 1;
|
|
150
|
+
break;
|
|
151
|
+
case 'livestreamsvoetbal.nl':
|
|
152
|
+
prefix = 1;
|
|
153
|
+
break;
|
|
154
|
+
default:
|
|
155
|
+
prefix = 0;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
return eventsArr.reduce((acc, current) => {
|
|
159
|
+
const event = changeEventHour(current, prefix);
|
|
160
|
+
acc[event.id] = event;
|
|
161
|
+
return acc;
|
|
162
|
+
}, {});
|
|
163
|
+
}
|
package/src/helpers/schema.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { getGameRating, getUrl, getLanguage } from './getters';
|
|
2
|
+
import { cleanHTML } from './strings';
|
|
2
3
|
|
|
3
4
|
/* HardCoded Start */
|
|
4
5
|
const isIL = process.env.GATSBY_SITE_NAME === 'Irishluck.ie';
|
|
@@ -178,9 +179,9 @@ export function moduleSchemas(modules) {
|
|
|
178
179
|
'@type': 'Question',
|
|
179
180
|
acceptedAnswer: {
|
|
180
181
|
'@type': 'Answer',
|
|
181
|
-
text: item.answer,
|
|
182
|
+
text: cleanHTML(item.answer),
|
|
182
183
|
},
|
|
183
|
-
name: item.question,
|
|
184
|
+
name: cleanHTML(item.question),
|
|
184
185
|
})),
|
|
185
186
|
};
|
|
186
187
|
|
|
@@ -370,8 +370,9 @@ describe('Schema Helper', () => {
|
|
|
370
370
|
test('schemaGenerator()', () => {
|
|
371
371
|
const output = Schema.schemaGenerator({
|
|
372
372
|
seo_json_schema: 'SEO JSON Schema',
|
|
373
|
-
breadcrumbs: [{}],
|
|
373
|
+
breadcrumbs: [{ path: '/test' }],
|
|
374
374
|
type: 'article',
|
|
375
|
+
path: '/test-path',
|
|
375
376
|
sections: { main: { modules: [{ name: 'faq' }] } },
|
|
376
377
|
});
|
|
377
378
|
|
package/src/helpers/strings.js
CHANGED
|
@@ -51,3 +51,7 @@ export function truncateString(str, num, dots = '...') {
|
|
|
51
51
|
trimmedString = trimmedString.substr(0, trimmedString.lastIndexOf(' '));
|
|
52
52
|
return `${trimmedString}${dots}`;
|
|
53
53
|
}
|
|
54
|
+
|
|
55
|
+
export function cleanHTML(string) {
|
|
56
|
+
return string && string.replace(/(<([^>]+)>)/gi, '');
|
|
57
|
+
}
|
|
@@ -26,7 +26,11 @@ describe('Strings Helper', () => {
|
|
|
26
26
|
});
|
|
27
27
|
|
|
28
28
|
test('truncateString()', () => {
|
|
29
|
-
expect(Strings.truncateString('hello i think',5)).toEqual('hello...');
|
|
30
|
-
expect(Strings.truncateString('hello i think',10)).toEqual('hello i...');
|
|
29
|
+
expect(Strings.truncateString('hello i think', 5)).toEqual('hello...');
|
|
30
|
+
expect(Strings.truncateString('hello i think', 10)).toEqual('hello i...');
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
test('cleanHTML()', () => {
|
|
34
|
+
expect(Strings.cleanHTML('<p>hello <a>i</a> think</p>')).toEqual('hello i think');
|
|
31
35
|
});
|
|
32
36
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
3
|
-
import LazyLoad from 'react-lazyload';
|
|
3
|
+
// import LazyLoad from 'react-lazyload';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
|
|
6
6
|
// When to use this component:
|
|
@@ -9,49 +9,68 @@ import PropTypes from 'prop-types';
|
|
|
9
9
|
export default function LazyImage({
|
|
10
10
|
height,
|
|
11
11
|
width,
|
|
12
|
-
offset = 200,
|
|
12
|
+
// offset = 200,
|
|
13
13
|
style = {},
|
|
14
14
|
className,
|
|
15
15
|
src = '#',
|
|
16
|
-
srcSet = '',
|
|
16
|
+
// srcSet = '',
|
|
17
17
|
alt = '',
|
|
18
|
-
sizes,
|
|
19
|
-
defaultImg,
|
|
20
|
-
once = false,
|
|
18
|
+
// sizes,
|
|
19
|
+
// defaultImg,
|
|
20
|
+
// once = false,
|
|
21
21
|
}) {
|
|
22
|
-
const [errorImage, setErrorImage] = useState(false);
|
|
22
|
+
// const [errorImage, setErrorImage] = useState(false);
|
|
23
23
|
|
|
24
|
-
if ((defaultImg && !src) || errorImage === true) {
|
|
25
|
-
|
|
26
|
-
}
|
|
24
|
+
// if ((defaultImg && !src) || errorImage === true) {
|
|
25
|
+
// return defaultImg;
|
|
26
|
+
// }
|
|
27
27
|
|
|
28
28
|
return (
|
|
29
|
-
|
|
29
|
+
<>
|
|
30
|
+
{/* <LazyLoad
|
|
31
|
+
height={`${height}px`}
|
|
32
|
+
width={`${width}px`}
|
|
33
|
+
offset={offset}
|
|
34
|
+
debounce={0}
|
|
35
|
+
once={once}
|
|
36
|
+
>
|
|
37
|
+
<img
|
|
38
|
+
src={src}
|
|
39
|
+
className={className}
|
|
40
|
+
height={height}
|
|
41
|
+
width={width}
|
|
42
|
+
alt={alt}
|
|
43
|
+
style={style}
|
|
44
|
+
srcSet={srcSet}
|
|
45
|
+
sizes={sizes}
|
|
46
|
+
onError={() => setErrorImage(true)}
|
|
47
|
+
/>
|
|
48
|
+
</LazyLoad> */}
|
|
49
|
+
{/* <noscript> */}
|
|
30
50
|
<img
|
|
31
51
|
src={src}
|
|
52
|
+
loading="lazy"
|
|
32
53
|
className={className}
|
|
33
54
|
height={height}
|
|
34
55
|
width={width}
|
|
35
56
|
alt={alt}
|
|
36
57
|
style={style}
|
|
37
|
-
srcSet={srcSet}
|
|
38
|
-
sizes={sizes}
|
|
39
|
-
onError={() => setErrorImage(true)}
|
|
40
58
|
/>
|
|
41
|
-
|
|
59
|
+
{/* </noscript> */}
|
|
60
|
+
</>
|
|
42
61
|
);
|
|
43
62
|
}
|
|
44
63
|
|
|
45
64
|
LazyImage.propTypes = {
|
|
46
65
|
width: PropTypes.number,
|
|
47
66
|
height: PropTypes.number,
|
|
48
|
-
offset: PropTypes.number,
|
|
67
|
+
// offset: PropTypes.number,
|
|
49
68
|
style: PropTypes.shape({}),
|
|
50
69
|
className: PropTypes.string,
|
|
51
70
|
src: PropTypes.string,
|
|
52
71
|
alt: PropTypes.string,
|
|
53
|
-
sizes: PropTypes.string,
|
|
54
|
-
srcSet: PropTypes.string,
|
|
55
|
-
defaultImg: PropTypes.element,
|
|
56
|
-
once: PropTypes.bool,
|
|
72
|
+
// sizes: PropTypes.string,
|
|
73
|
+
// srcSet: PropTypes.string,
|
|
74
|
+
// defaultImg: PropTypes.element,
|
|
75
|
+
// once: PropTypes.bool,
|
|
57
76
|
};
|
|
@@ -60,7 +60,12 @@ const ModalContent = ({ closeIcon }) => {
|
|
|
60
60
|
<div className={styles.modalOverlay} onClick={close} />
|
|
61
61
|
<div className={styles.modalContent}>
|
|
62
62
|
{closeIcon && (
|
|
63
|
-
<button
|
|
63
|
+
<button
|
|
64
|
+
className={`${styles.closeIcon} modal-gtm btn-cta`}
|
|
65
|
+
aria-label="Close Icon"
|
|
66
|
+
type="button"
|
|
67
|
+
onClick={close}
|
|
68
|
+
>
|
|
64
69
|
{closeIcon}
|
|
65
70
|
</button>
|
|
66
71
|
)}
|
package/tests/envVars.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
process.env.GATSBY_SITE_NAME = 'norskespilleautomater.com';
|
|
2
|
-
process.env.GATSBY_SITE_URL = 'http://urltest.com';
|
|
2
|
+
process.env.GATSBY_SITE_URL = 'http://urltest.com/';
|
|
3
3
|
process.env.IMAGE_CDN_URL = 'https://cdn.images.com';
|
|
4
4
|
process.env.TRACKER_LINK_FORMAT_MAIN = '[no],[visit],short_name';
|
|
5
5
|
process.env.TRACKER_LINK_FORMAT_NON_MAIN = '[no],[visit],short_name,type,[tracker]';
|