gatsby-matrix-theme 32.0.4 → 32.0.6
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 +22 -0
- package/package.json +2 -2
- package/src/components/atoms/cards/game-cards/template-five/index.js +8 -7
- package/src/components/atoms/cards/game-cards/template-five/template-five.test.js +2 -2
- package/src/components/atoms/cards/game-cards/template-four/index.js +7 -6
- package/src/components/atoms/cards/game-cards/template-four/template-four.test.js +2 -2
- package/src/components/atoms/cards/game-cards/template-one/index.js +7 -6
- package/src/components/atoms/cards/game-cards/template-one/template-one.test.js +2 -2
- package/src/components/atoms/cards/game-cards/template-three/index.js +7 -6
- package/src/components/atoms/cards/game-cards/template-three/template-three.test.js +2 -2
- package/src/components/atoms/cards/game-cards/template-two/index.js +7 -5
- package/src/components/atoms/cards/game-cards/template-two/template-two.test.js +2 -2
- package/src/components/molecules/operator-exclusive/index.js +58 -41
- package/src/components/molecules/operator-exclusive/oeprator-exlusive.module.scss +10 -30
- package/storybook/public/iframe.html +1 -1
- package/storybook/public/main.dad56c23.iframe.bundle.js +2 -0
- package/storybook/public/main.3afcbd3a.iframe.bundle.js +0 -2
- /package/storybook/public/{main.3afcbd3a.iframe.bundle.js.LICENSE.txt → main.dad56c23.iframe.bundle.js.LICENSE.txt} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
## [32.0.6](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v32.0.5...v32.0.6) (2023-09-14)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* update close button ([256cf7e](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/256cf7e5cc3c60b9f33c5f0c9024e23a780e9026))
|
|
7
|
+
* update core version ([dc91e6a](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/dc91e6a77ccf5e259a3b275b7a37cdfcbddcda4d))
|
|
8
|
+
* update eclusive operator ([a1c22db](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/a1c22db0c00f6414884902fe97bb507d5235a96b))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
* Merge branch 'tm-3638-pcsa-ui-ux-mobile' into 'master' ([c000172](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/c000172c26f570e3e9e9fc6d4b630eba82b97214))
|
|
12
|
+
|
|
13
|
+
## [32.0.5](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v32.0.4...v32.0.5) (2023-09-07)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* use the game name not title of the page for cards ([ca32475](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/ca3247544d59edf423106e781bbee2c35c85b2e2))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
* Merge branch 'tm-3666-slots-name' into 'master' ([45622ab](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/45622ab96df45678bffbed25d8507dfaa12113e0))
|
|
22
|
+
|
|
1
23
|
## [32.0.4](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v32.0.3...v32.0.4) (2023-09-06)
|
|
2
24
|
|
|
3
25
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gatsby-matrix-theme",
|
|
3
|
-
"version": "32.0.
|
|
3
|
+
"version": "32.0.6",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"description": "Matrix Theme NPM Package",
|
|
6
6
|
"author": "",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@react-icons/all-files": "^4.1.0",
|
|
27
27
|
"gatsby": "^5.11.0",
|
|
28
|
-
"gatsby-core-theme": "29.0.
|
|
28
|
+
"gatsby-core-theme": "29.0.5",
|
|
29
29
|
"gatsby-plugin-sharp": "^5.11.0",
|
|
30
30
|
"gatsby-plugin-sitemap": "^3.3.0",
|
|
31
31
|
"gatsby-transformer-sharp": "^5.11.0",
|
|
@@ -28,7 +28,8 @@ const TemplateFive = ({
|
|
|
28
28
|
storybookImage,
|
|
29
29
|
storybookLogo,
|
|
30
30
|
}) => {
|
|
31
|
-
const { relation,
|
|
31
|
+
const { relation, path, banner } = item;
|
|
32
|
+
const { name } = relation;
|
|
32
33
|
const { translations } = useContext(Context) || {};
|
|
33
34
|
const featured = !!getSectionExtraField(null, item, 'card_background_image');
|
|
34
35
|
const operator = item.extra_fields?.operator;
|
|
@@ -49,17 +50,17 @@ const TemplateFive = ({
|
|
|
49
50
|
<Link
|
|
50
51
|
to={path}
|
|
51
52
|
className={`game-card-gtm ${styles?.cardBanner || ''}`}
|
|
52
|
-
aria-label={`${
|
|
53
|
+
aria-label={`${name} Link`}
|
|
53
54
|
>
|
|
54
55
|
{storybookImage || gameImage ? (
|
|
55
56
|
<LazyImage
|
|
56
57
|
width={width}
|
|
57
58
|
height={height}
|
|
58
59
|
src={storybookImage || imagePrettyUrl(gameImage, width, height)}
|
|
59
|
-
alt={getAltText(relation?.thumbnail_filename_object,
|
|
60
|
+
alt={getAltText(relation?.thumbnail_filename_object, name)}
|
|
60
61
|
/>
|
|
61
62
|
) : (
|
|
62
|
-
<GatsbyImg filename="default-slot.jpg" alt={
|
|
63
|
+
<GatsbyImg filename="default-slot.jpg" alt={name} />
|
|
63
64
|
)}
|
|
64
65
|
</Link>
|
|
65
66
|
<div className={`${styles?.cardContent || ''} ${featured ? styles.featured || '' : ''}`}>
|
|
@@ -80,7 +81,7 @@ const TemplateFive = ({
|
|
|
80
81
|
)}
|
|
81
82
|
</div>
|
|
82
83
|
<Link to={path} className="game-card-gtm">
|
|
83
|
-
<span className={styles?.cardTitle || ''}>{
|
|
84
|
+
<span className={styles?.cardTitle || ''}>{name}</span>
|
|
84
85
|
</Link>
|
|
85
86
|
<div className={styles?.cardInner || ''}>
|
|
86
87
|
{(storybookLogo || operatorLogo) && (
|
|
@@ -89,7 +90,7 @@ const TemplateFive = ({
|
|
|
89
90
|
width={48}
|
|
90
91
|
height={48}
|
|
91
92
|
src={storybookLogo || imagePrettyUrl(operatorLogo.filename, width, height)}
|
|
92
|
-
alt={getAltText(operatorLogo,
|
|
93
|
+
alt={getAltText(operatorLogo, name)}
|
|
93
94
|
/>
|
|
94
95
|
)}
|
|
95
96
|
{operator && operator.path ? (
|
|
@@ -147,6 +148,7 @@ TemplateFive.propTypes = {
|
|
|
147
148
|
first_rating: PropTypes.string,
|
|
148
149
|
second_rating: PropTypes.string,
|
|
149
150
|
third_rating: PropTypes.string,
|
|
151
|
+
name: PropTypes.string,
|
|
150
152
|
fourth_rating: PropTypes.string,
|
|
151
153
|
game_provider: PropTypes.shape({
|
|
152
154
|
name: PropTypes.string,
|
|
@@ -158,7 +160,6 @@ TemplateFive.propTypes = {
|
|
|
158
160
|
alt: PropTypes.string,
|
|
159
161
|
}),
|
|
160
162
|
}),
|
|
161
|
-
title: PropTypes.string,
|
|
162
163
|
path: PropTypes.string,
|
|
163
164
|
banner: PropTypes.string,
|
|
164
165
|
extra_fields: PropTypes.shape({
|
|
@@ -17,7 +17,7 @@ describe('Game Cards', () => {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
const { container, getByText } = render(<TemplateFive item={card} />);
|
|
20
|
-
expect(getByText('
|
|
20
|
+
expect(getByText('Wildz Casino')).toBeTruthy();
|
|
21
21
|
expect(getByText('Test Game Provider')).toBeTruthy();
|
|
22
22
|
expect(getByText('Play now')).toBeTruthy();
|
|
23
23
|
expect(container.querySelectorAll('a')).toHaveLength(4);
|
|
@@ -38,7 +38,7 @@ describe('Game Cards', () => {
|
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
const { container, getByText } = render(<TemplateFive useOneStarRating={false} item={card} />);
|
|
41
|
-
expect(getByText('
|
|
41
|
+
expect(getByText('Wildz Casino')).toBeTruthy();
|
|
42
42
|
expect(getByText('Play at Test Game Operator and get 20 free spins')).toBeTruthy();
|
|
43
43
|
expect(getByText('Play now')).toBeTruthy();
|
|
44
44
|
expect(container.querySelectorAll('a')).toHaveLength(4);
|
|
@@ -27,7 +27,8 @@ const TemplateFour = ({
|
|
|
27
27
|
useThumbnail = true,
|
|
28
28
|
storybookImage,
|
|
29
29
|
}) => {
|
|
30
|
-
const { relation,
|
|
30
|
+
const { relation, path, banner } = item;
|
|
31
|
+
const { name } = relation;
|
|
31
32
|
const { translations } = useContext(Context) || {};
|
|
32
33
|
const featured = !!getSectionExtraField(null, item, 'card_background_image');
|
|
33
34
|
const operator = item.extra_fields?.operator;
|
|
@@ -42,17 +43,17 @@ const TemplateFour = ({
|
|
|
42
43
|
<Link
|
|
43
44
|
to={path}
|
|
44
45
|
className={`game-card-gtm ${styles?.cardBanner || ''}`}
|
|
45
|
-
aria-label={`${
|
|
46
|
+
aria-label={`${name} Link`}
|
|
46
47
|
>
|
|
47
48
|
{storybookImage || gameImage ? (
|
|
48
49
|
<LazyImage
|
|
49
50
|
width={width}
|
|
50
51
|
height={height}
|
|
51
52
|
src={storybookImage || imagePrettyUrl(gameImage, width, height)}
|
|
52
|
-
alt={getAltText(relation?.thumbnail_filename_object,
|
|
53
|
+
alt={getAltText(relation?.thumbnail_filename_object, name)}
|
|
53
54
|
/>
|
|
54
55
|
) : (
|
|
55
|
-
<GatsbyImg filename="default-slot.jpg" alt={
|
|
56
|
+
<GatsbyImg filename="default-slot.jpg" alt={name} />
|
|
56
57
|
)}
|
|
57
58
|
</Link>
|
|
58
59
|
{relation && (
|
|
@@ -71,7 +72,7 @@ const TemplateFour = ({
|
|
|
71
72
|
)}
|
|
72
73
|
<div className={`${styles?.cardContent || ''} ${featured ? styles.featured : ''}`}>
|
|
73
74
|
<Link to={path} className="game-card-gtm">
|
|
74
|
-
<span className={styles?.cardTitle || ''}>{
|
|
75
|
+
<span className={styles?.cardTitle || ''}>{name}</span>
|
|
75
76
|
</Link>
|
|
76
77
|
<div className={styles?.cardInner || ''}>
|
|
77
78
|
<span>
|
|
@@ -132,6 +133,7 @@ TemplateFour.propTypes = {
|
|
|
132
133
|
first_rating: PropTypes.string,
|
|
133
134
|
second_rating: PropTypes.string,
|
|
134
135
|
third_rating: PropTypes.string,
|
|
136
|
+
name: PropTypes.string,
|
|
135
137
|
fourth_rating: PropTypes.string,
|
|
136
138
|
game_provider: PropTypes.shape({ name: PropTypes.string, path: PropTypes.string }),
|
|
137
139
|
thumbnail_filename_object: PropTypes.shape({
|
|
@@ -139,7 +141,6 @@ TemplateFour.propTypes = {
|
|
|
139
141
|
alt: PropTypes.string,
|
|
140
142
|
}),
|
|
141
143
|
}),
|
|
142
|
-
title: PropTypes.string,
|
|
143
144
|
path: PropTypes.string,
|
|
144
145
|
banner: PropTypes.string,
|
|
145
146
|
extra_fields: PropTypes.shape({
|
|
@@ -17,7 +17,7 @@ describe('Game Cards', () => {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
const { container, getByText } = render(<TemplateFour item={card} />);
|
|
20
|
-
expect(getByText('
|
|
20
|
+
expect(getByText('Wildz Casino')).toBeTruthy();
|
|
21
21
|
expect(getByText('Test Game Provider')).toBeTruthy();
|
|
22
22
|
expect(getByText('Play now')).toBeTruthy();
|
|
23
23
|
expect(container.querySelectorAll('a')).toHaveLength(4);
|
|
@@ -33,7 +33,7 @@ describe('Game Cards', () => {
|
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
const { container, getByText } = render(<TemplateFour useOneStarRating={false} item={card} />);
|
|
36
|
-
expect(getByText('
|
|
36
|
+
expect(getByText('Wildz Casino')).toBeTruthy();
|
|
37
37
|
expect(getByText('Test Game Operator')).toBeTruthy();
|
|
38
38
|
expect(getByText('Play now')).toBeTruthy();
|
|
39
39
|
expect(container.querySelectorAll('a')).toHaveLength(4);
|
|
@@ -28,7 +28,8 @@ const TemplateOne = ({
|
|
|
28
28
|
useThumbnail = true,
|
|
29
29
|
storybookImage,
|
|
30
30
|
}) => {
|
|
31
|
-
const { relation,
|
|
31
|
+
const { relation, path, banner } = item;
|
|
32
|
+
const { name } = relation;
|
|
32
33
|
const { translations } = useContext(Context) || {};
|
|
33
34
|
const featured = !!getSectionExtraField(null, item, 'card_background_image');
|
|
34
35
|
const operator = item.extra_fields?.operator;
|
|
@@ -43,22 +44,22 @@ const TemplateOne = ({
|
|
|
43
44
|
<Link
|
|
44
45
|
to={path}
|
|
45
46
|
className={`game-card-gtm ${styles?.cardBanner || ''}`}
|
|
46
|
-
aria-label={`${
|
|
47
|
+
aria-label={`${name} Link`}
|
|
47
48
|
>
|
|
48
49
|
{storybookImage || gameImage ? (
|
|
49
50
|
<LazyImage
|
|
50
51
|
width={width}
|
|
51
52
|
height={height}
|
|
52
53
|
src={storybookImage || imagePrettyUrl(gameImage, width, height)}
|
|
53
|
-
alt={getAltText(relation?.thumbnail_filename_object,
|
|
54
|
+
alt={getAltText(relation?.thumbnail_filename_object, name)}
|
|
54
55
|
/>
|
|
55
56
|
) : (
|
|
56
|
-
<GatsbyImg filename="default-slot.jpg" alt={
|
|
57
|
+
<GatsbyImg filename="default-slot.jpg" alt={name} />
|
|
57
58
|
)}
|
|
58
59
|
</Link>
|
|
59
60
|
<div className={`${styles?.cardContent || ''} ${featured ? styles?.featured || '' : ''}`}>
|
|
60
61
|
<Link to={path} className="game-card-gtm">
|
|
61
|
-
<span className={styles?.cardTitle || ''}>{
|
|
62
|
+
<span className={styles?.cardTitle || ''}>{name}</span>
|
|
62
63
|
</Link>
|
|
63
64
|
<div className={styles?.cardInner || ''}>
|
|
64
65
|
{operator && operator.path ? (
|
|
@@ -133,6 +134,7 @@ TemplateOne.propTypes = {
|
|
|
133
134
|
first_rating: PropTypes.string,
|
|
134
135
|
second_rating: PropTypes.string,
|
|
135
136
|
third_rating: PropTypes.string,
|
|
137
|
+
name: PropTypes.string,
|
|
136
138
|
fourth_rating: PropTypes.string,
|
|
137
139
|
game_provider: PropTypes.shape({ name: PropTypes.string, path: PropTypes.string }),
|
|
138
140
|
thumbnail_filename_object: PropTypes.shape({
|
|
@@ -140,7 +142,6 @@ TemplateOne.propTypes = {
|
|
|
140
142
|
alt: PropTypes.string,
|
|
141
143
|
}),
|
|
142
144
|
}),
|
|
143
|
-
title: PropTypes.string,
|
|
144
145
|
path: PropTypes.string,
|
|
145
146
|
banner: PropTypes.string,
|
|
146
147
|
extra_fields: PropTypes.shape({
|
|
@@ -17,7 +17,7 @@ describe('Game Cards', () => {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
const { container, getByText } = render(<TemplateOne item={card} />);
|
|
20
|
-
expect(getByText('
|
|
20
|
+
expect(getByText('Wildz Casino')).toBeTruthy();
|
|
21
21
|
expect(getByText('Test Game Provider')).toBeTruthy();
|
|
22
22
|
expect(getByText('Play now')).toBeTruthy();
|
|
23
23
|
expect(container.querySelectorAll('a')).toHaveLength(4);
|
|
@@ -33,7 +33,7 @@ describe('Game Cards', () => {
|
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
const { container, getByText } = render(<TemplateOne useOneStarRating={false} item={card} />);
|
|
36
|
-
expect(getByText('
|
|
36
|
+
expect(getByText('Wildz Casino')).toBeTruthy();
|
|
37
37
|
expect(getByText('Test Game Operator')).toBeTruthy();
|
|
38
38
|
expect(getByText('Play now')).toBeTruthy();
|
|
39
39
|
expect(container.querySelectorAll('a')).toHaveLength(4);
|
|
@@ -27,7 +27,8 @@ const TemplateThree = ({
|
|
|
27
27
|
useThumbnail = true,
|
|
28
28
|
storybookImage,
|
|
29
29
|
}) => {
|
|
30
|
-
const { relation,
|
|
30
|
+
const { relation, path, banner } = item;
|
|
31
|
+
const { name } = relation;
|
|
31
32
|
const { translations } = useContext(Context) || {};
|
|
32
33
|
const featured = !!getSectionExtraField(null, item, 'card_background_image');
|
|
33
34
|
const operator = item.extra_fields?.operator;
|
|
@@ -42,17 +43,17 @@ const TemplateThree = ({
|
|
|
42
43
|
<Link
|
|
43
44
|
to={path}
|
|
44
45
|
className={`game-card-gtm ${styles?.cardBanner || ''}`}
|
|
45
|
-
aria-label={`${
|
|
46
|
+
aria-label={`${name} Link`}
|
|
46
47
|
>
|
|
47
48
|
{storybookImage || gameImage ? (
|
|
48
49
|
<LazyImage
|
|
49
50
|
width={width}
|
|
50
51
|
height={height}
|
|
51
52
|
src={storybookImage || imagePrettyUrl(gameImage, width, height)}
|
|
52
|
-
alt={getAltText(relation?.thumbnail_filename_object,
|
|
53
|
+
alt={getAltText(relation?.thumbnail_filename_object, name)}
|
|
53
54
|
/>
|
|
54
55
|
) : (
|
|
55
|
-
<GatsbyImg filename="default-slot.jpg" alt={
|
|
56
|
+
<GatsbyImg filename="default-slot.jpg" alt={name} />
|
|
56
57
|
)}
|
|
57
58
|
</Link>
|
|
58
59
|
<div className={`${styles?.cardContent || ''} ${featured ? styles.featured || '' : ''}`}>
|
|
@@ -73,7 +74,7 @@ const TemplateThree = ({
|
|
|
73
74
|
)}
|
|
74
75
|
</div>
|
|
75
76
|
<Link to={path} className="game-card-gtm">
|
|
76
|
-
<span className={styles?.cardTitle || ''}>{
|
|
77
|
+
<span className={styles?.cardTitle || ''}>{name}</span>
|
|
77
78
|
</Link>
|
|
78
79
|
<div className={styles?.cardInner || ''}>
|
|
79
80
|
{operator && operator.path ? (
|
|
@@ -132,13 +133,13 @@ TemplateThree.propTypes = {
|
|
|
132
133
|
second_rating: PropTypes.string,
|
|
133
134
|
third_rating: PropTypes.string,
|
|
134
135
|
fourth_rating: PropTypes.string,
|
|
136
|
+
name: PropTypes.string,
|
|
135
137
|
game_provider: PropTypes.shape({ name: PropTypes.string, path: PropTypes.string }),
|
|
136
138
|
thumbnail_filename_object: PropTypes.shape({
|
|
137
139
|
filename: PropTypes.string,
|
|
138
140
|
alt: PropTypes.string,
|
|
139
141
|
}),
|
|
140
142
|
}),
|
|
141
|
-
title: PropTypes.string,
|
|
142
143
|
path: PropTypes.string,
|
|
143
144
|
banner: PropTypes.string,
|
|
144
145
|
extra_fields: PropTypes.shape({
|
|
@@ -17,7 +17,7 @@ describe('Game Cards', () => {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
const { container, getByText } = render(<TemplateThree item={card} />);
|
|
20
|
-
expect(getByText('
|
|
20
|
+
expect(getByText('Wildz Casino')).toBeTruthy();
|
|
21
21
|
expect(getByText('Test Game Provider')).toBeTruthy();
|
|
22
22
|
expect(getByText('Play now')).toBeTruthy();
|
|
23
23
|
expect(container.querySelectorAll('a')).toHaveLength(4);
|
|
@@ -33,7 +33,7 @@ describe('Game Cards', () => {
|
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
const { container, getByText } = render(<TemplateThree useOneStarRating={false} item={card} />);
|
|
36
|
-
expect(getByText('
|
|
36
|
+
expect(getByText('Wildz Casino')).toBeTruthy();
|
|
37
37
|
expect(getByText('Test Game Operator')).toBeTruthy();
|
|
38
38
|
expect(getByText('Play now')).toBeTruthy();
|
|
39
39
|
expect(container.querySelectorAll('a')).toHaveLength(4);
|
|
@@ -27,7 +27,8 @@ const TemplateTwo = ({
|
|
|
27
27
|
useThumbnail = true,
|
|
28
28
|
storybookImage,
|
|
29
29
|
}) => {
|
|
30
|
-
const { relation,
|
|
30
|
+
const { relation, path, banner } = item;
|
|
31
|
+
const { name } = relation;
|
|
31
32
|
const { translations } = useContext(Context) || {};
|
|
32
33
|
const featured = !!getSectionExtraField(null, item, 'card_background_image');
|
|
33
34
|
const operator = item.extra_fields?.operator;
|
|
@@ -42,23 +43,23 @@ const TemplateTwo = ({
|
|
|
42
43
|
<Link
|
|
43
44
|
to={path}
|
|
44
45
|
className={`game-card-gtm ${styles?.cardBanner || ''}`}
|
|
45
|
-
aria-label={`${
|
|
46
|
+
aria-label={`${name} Link`}
|
|
46
47
|
>
|
|
47
48
|
{storybookImage || gameImage ? (
|
|
48
49
|
<LazyImage
|
|
49
50
|
width={width}
|
|
50
51
|
height={height}
|
|
51
52
|
src={storybookImage || imagePrettyUrl(gameImage, width, height)}
|
|
52
|
-
alt={getAltText(relation?.thumbnail_filename_object,
|
|
53
|
+
alt={getAltText(relation?.thumbnail_filename_object, name)}
|
|
53
54
|
/>
|
|
54
55
|
) : (
|
|
55
|
-
<GatsbyImg filename="default-slot.jpg" alt={
|
|
56
|
+
<GatsbyImg filename="default-slot.jpg" alt={name} />
|
|
56
57
|
)}
|
|
57
58
|
</Link>
|
|
58
59
|
<div className={`${styles?.cardContent || ''} ${featured ? styles?.featured || '' : ''}`}>
|
|
59
60
|
<div className={styles?.cardInnerTop || ''}>
|
|
60
61
|
<Link to={path} className="game-card-gtm">
|
|
61
|
-
<span className={styles?.cardTitle || ''}>{
|
|
62
|
+
<span className={styles?.cardTitle || ''}>{name}</span>
|
|
62
63
|
</Link>
|
|
63
64
|
<div className={styles?.cardRating || ''}>
|
|
64
65
|
{relation && (
|
|
@@ -134,6 +135,7 @@ TemplateTwo.propTypes = {
|
|
|
134
135
|
second_rating: PropTypes.string,
|
|
135
136
|
third_rating: PropTypes.string,
|
|
136
137
|
fourth_rating: PropTypes.string,
|
|
138
|
+
name: PropTypes.string,
|
|
137
139
|
game_provider: PropTypes.shape({ name: PropTypes.string, path: PropTypes.string }),
|
|
138
140
|
thumbnail_filename_object: PropTypes.shape({
|
|
139
141
|
filename: PropTypes.string,
|
|
@@ -17,7 +17,7 @@ describe('Game Cards', () => {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
const { container, getByText } = render(<TemplateTwo item={card} />);
|
|
20
|
-
expect(getByText('
|
|
20
|
+
expect(getByText('Wildz Casino')).toBeTruthy();
|
|
21
21
|
expect(getByText('Test Game Provider')).toBeTruthy();
|
|
22
22
|
expect(getByText('Play now')).toBeTruthy();
|
|
23
23
|
expect(container.querySelectorAll('a')).toHaveLength(4);
|
|
@@ -33,7 +33,7 @@ describe('Game Cards', () => {
|
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
const { container, getByText } = render(<TemplateTwo useOneStarRating={false} item={card} />);
|
|
36
|
-
expect(getByText('
|
|
36
|
+
expect(getByText('Wildz Casino')).toBeTruthy();
|
|
37
37
|
expect(getByText('Test Game Operator')).toBeTruthy();
|
|
38
38
|
expect(getByText('Play now')).toBeTruthy();
|
|
39
39
|
expect(container.querySelectorAll('a')).toHaveLength(4);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable react/prop-types */
|
|
3
3
|
/* eslint-disable no-nested-ternary */
|
|
4
4
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
5
|
-
import React, { useContext } from 'react';
|
|
5
|
+
import React, { useContext, useState } from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import { Context } from 'gatsby-core-theme/src/context/MainProvider';
|
|
8
8
|
import Link from 'gatsby-core-theme/src/hooks/link';
|
|
@@ -12,7 +12,7 @@ import LazyImage from 'gatsby-core-theme/src/hooks/lazy-image';
|
|
|
12
12
|
import { imagePrettyUrl, translate, getAltText } from '~helpers/getters';
|
|
13
13
|
import styles from './oeprator-exlusive.module.scss';
|
|
14
14
|
|
|
15
|
-
const Banner = ({ bonus, template }) => {
|
|
15
|
+
const Banner = ({ bonus, template, closeButtonIcon = true }) => {
|
|
16
16
|
const { value, module_title } = bonus;
|
|
17
17
|
const [, reviewPath] = value.review_link.split('.co.za/');
|
|
18
18
|
const splitBy = module_title?.includes('OR') ? 'OR' : module_title?.includes('+') ? '+' : '&';
|
|
@@ -22,49 +22,66 @@ const Banner = ({ bonus, template }) => {
|
|
|
22
22
|
const { translations } = useContext(Context) || {};
|
|
23
23
|
const imageObject = value?.standardised_logo_url_object || value?.logo_url_object;
|
|
24
24
|
const tracker = isMobileDevice() ? 'mobbanner' : 'banner';
|
|
25
|
+
const [closed, setClosed] = useState(false);
|
|
25
26
|
|
|
26
27
|
return (
|
|
27
|
-
<div
|
|
28
|
-
|
|
29
|
-
<div className={styles?.
|
|
30
|
-
{
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
28
|
+
<div>
|
|
29
|
+
{!closed && (
|
|
30
|
+
<div className={`${styles?.wrapper || ''}`}>
|
|
31
|
+
<div className={styles?.content || ''}>
|
|
32
|
+
{closeButtonIcon && (
|
|
33
|
+
<button
|
|
34
|
+
className={closed ? `${styles.closed || ''}` : `${styles.closeButton || ''}`}
|
|
35
|
+
type="button"
|
|
36
|
+
onClick={() => setClosed(true)}
|
|
37
|
+
>
|
|
38
|
+
✕
|
|
39
|
+
</button>
|
|
40
|
+
)}
|
|
41
|
+
<div className={styles?.offer || ''}>
|
|
42
|
+
{translate(translations, 'exclusive_offer', 'EXCLUSIVE OFFER')}
|
|
43
|
+
</div>
|
|
44
|
+
<div className={styles?.logo || ''}>
|
|
45
|
+
<Link to={reviewPath} title={bonus.name} className="banner-gtm bonus-cta logo-cta">
|
|
46
|
+
<LazyImage
|
|
47
|
+
alt={getAltText(imageObject, value.name)}
|
|
48
|
+
src={imagePrettyUrl(imageObject?.filename || imageObject?.logo_url, 48, 48)}
|
|
49
|
+
width={48}
|
|
50
|
+
height={48}
|
|
51
|
+
loading="eager"
|
|
52
|
+
/>
|
|
53
|
+
</Link>
|
|
54
|
+
</div>
|
|
55
|
+
<div className={styles?.info || ''}>
|
|
56
|
+
<p>
|
|
57
|
+
{bonus.value.name}: Get <span>{firstLine}</span>
|
|
58
|
+
{secondLine && splitBy + secondLine}
|
|
59
|
+
</p>
|
|
60
|
+
<div className={styles?.button || ''}>
|
|
61
|
+
<OperatorCta
|
|
62
|
+
operator={bonus.value}
|
|
63
|
+
translationsObj={{
|
|
64
|
+
active: { translationKey: 'play_now', defaultValue: 'Play now' },
|
|
65
|
+
not_recommended: {
|
|
66
|
+
translationKey: 'not_recommended',
|
|
67
|
+
defaultValue: 'Not Recommended',
|
|
68
|
+
},
|
|
69
|
+
coming_soon: { translationKey: 'coming_soon', defaultValue: 'Soon Available' },
|
|
70
|
+
inactive: {
|
|
71
|
+
translationKey: 'inactive',
|
|
72
|
+
defaultValue: 'Not Accepting New Players',
|
|
73
|
+
},
|
|
74
|
+
blacklisted: { translationKey: 'blacklisted', defaultValue: 'Blacklisted' },
|
|
75
|
+
}}
|
|
76
|
+
tracker={tracker}
|
|
77
|
+
gtmClass="banner-operator-cta-gtm"
|
|
78
|
+
pageTemplate={template}
|
|
79
|
+
/>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
65
82
|
</div>
|
|
66
83
|
</div>
|
|
67
|
-
|
|
84
|
+
)}
|
|
68
85
|
</div>
|
|
69
86
|
);
|
|
70
87
|
};
|
|
@@ -85,38 +85,21 @@
|
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
.closeButton {
|
|
88
|
-
padding: 0 0.3rem 2rem 0.3rem;
|
|
89
88
|
cursor: pointer;
|
|
90
|
-
width:
|
|
91
|
-
height:
|
|
92
|
-
|
|
89
|
+
width: 1.4rem;
|
|
90
|
+
height: 1.4rem;
|
|
91
|
+
color: #6E6E84;
|
|
93
92
|
position: absolute;
|
|
94
|
-
right:
|
|
93
|
+
right: 0rem;
|
|
95
94
|
border-radius: 50%;
|
|
96
|
-
top:
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
display:
|
|
100
|
-
width: 1rem;
|
|
101
|
-
height: 0.2rem;
|
|
102
|
-
background-color: var(--color-1);
|
|
103
|
-
transform: rotate(45deg);
|
|
104
|
-
position: absolute;
|
|
105
|
-
top: 0.9rem;
|
|
106
|
-
right: 0.5rem;
|
|
107
|
-
}
|
|
108
|
-
&::after {
|
|
109
|
-
content: '';
|
|
110
|
-
display: inline-block;
|
|
111
|
-
width: 0.2rem;
|
|
112
|
-
height: 1rem;
|
|
113
|
-
background-color: white;
|
|
114
|
-
transform: rotate(45deg);
|
|
115
|
-
position: absolute;
|
|
116
|
-
top: 0.5rem;
|
|
117
|
-
right: 0.9rem;
|
|
95
|
+
top: 0rem;
|
|
96
|
+
|
|
97
|
+
@include min(tablet) {
|
|
98
|
+
display: none;
|
|
118
99
|
}
|
|
119
100
|
}
|
|
101
|
+
|
|
102
|
+
|
|
120
103
|
}
|
|
121
104
|
@include min(tablet) {
|
|
122
105
|
padding: 0 2rem;
|
|
@@ -153,6 +136,3 @@
|
|
|
153
136
|
}
|
|
154
137
|
}
|
|
155
138
|
}
|
|
156
|
-
.close {
|
|
157
|
-
display: none;
|
|
158
|
-
}
|
|
@@ -361,4 +361,4 @@
|
|
|
361
361
|
|
|
362
362
|
|
|
363
363
|
|
|
364
|
-
window['STORIES'] = [{"titlePrefix":"","directory":"./src","files":"**/**/**/*.stories.js","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.js)$"},{"titlePrefix":"","directory":"./src","files":"**/**/**/**/*.stories.js","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.js)$"},{"titlePrefix":"","directory":"./src","files":"**/**/**/**/**/*.stories.js","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/organisms/navigation","files":"navigation.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/organisms\\/navigation\\/navigation\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/organisms/anchor","files":"anchor.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/organisms\\/anchor\\/anchor\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/bonus/template-one","files":"bonus.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/bonus\\/template-one\\/bonus\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/bonus/template-two","files":"bonus.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/bonus\\/template-two\\/bonus\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/content","files":"content.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/content\\/content\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/content/table","files":"table.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/content\\/table\\/table\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/content/text/Images","files":"text.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/content\\/text\\/Images\\/text\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/content/lists","files":"lists.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/content\\/lists\\/lists\\.stories\\.js)$"}];</script><script src="runtime~main.9e186118.iframe.bundle.js"></script><script src="958.0d025941.iframe.bundle.js"></script><script src="main.
|
|
364
|
+
window['STORIES'] = [{"titlePrefix":"","directory":"./src","files":"**/**/**/*.stories.js","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.js)$"},{"titlePrefix":"","directory":"./src","files":"**/**/**/**/*.stories.js","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.js)$"},{"titlePrefix":"","directory":"./src","files":"**/**/**/**/**/*.stories.js","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/organisms/navigation","files":"navigation.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/organisms\\/navigation\\/navigation\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/organisms/anchor","files":"anchor.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/organisms\\/anchor\\/anchor\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/bonus/template-one","files":"bonus.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/bonus\\/template-one\\/bonus\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/bonus/template-two","files":"bonus.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/bonus\\/template-two\\/bonus\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/content","files":"content.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/content\\/content\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/content/table","files":"table.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/content\\/table\\/table\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/content/text/Images","files":"text.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/content\\/text\\/Images\\/text\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/content/lists","files":"lists.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/content\\/lists\\/lists\\.stories\\.js)$"}];</script><script src="runtime~main.9e186118.iframe.bundle.js"></script><script src="958.0d025941.iframe.bundle.js"></script><script src="main.dad56c23.iframe.bundle.js"></script></body></html>
|