gatsby-core-theme 33.1.10 → 33.1.11
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 +21 -0
- package/package.json +1 -1
- package/src/components/molecules/bonus/template-one/bonus.module.scss +1 -75
- package/src/components/molecules/bonus/template-one/bonus.stories.js +4 -26
- package/src/components/molecules/bonus/template-one/index.js +4 -13
- package/src/components/molecules/bonus/template-two/bonus.stories.js +5 -17
- package/src/components/molecules/bonus/template-two/index.js +5 -14
- package/src/components/molecules/newsletter/form/index.js +9 -2
- package/src/components/molecules/tnc/index.js +7 -31
- package/src/components/molecules/tnc/tnc.module.scss +5 -25
- package/src/components/molecules/tnc/tnc.stories.js +7 -93
- package/src/components/molecules/tnc/tnc.test.js +0 -14
- package/src/helpers/getters.mjs +1 -2
- package/src/helpers/schema.js +0 -31
- package/tests/factories/relations/operator.factory.js +11 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
## [33.1.11](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v33.1.10...v33.1.11) (2024-07-05)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* newsletter reverted chnaged ([82dc756](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/82dc756c4e0ea0e2243a1754225d1d2c170cb5a0))
|
|
7
|
+
* remove env var ([6b2fee3](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/6b2fee3a6332924004b077195c3843f68611c473))
|
|
8
|
+
* tandc fixes ([f3c6f5e](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/f3c6f5e67ec9d486cfe73af31f5c9ff3e42d63d3))
|
|
9
|
+
* tandc fixes ([c7c05a0](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/c7c05a0639a797898db68703ef7778c5d7c27bf3))
|
|
10
|
+
* tandc fixes ([0faa015](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/0faa015f6acb9b48fa654dab9f787cfbf8a5cabd))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Code Refactoring
|
|
14
|
+
|
|
15
|
+
* remove org schema, add tabindex for scrollable content ([27d632f](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/27d632f762626f46c75ce6992910912634b03daa))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
* Merge branch 'tm-4453-tandc' into 'master' ([958f39b](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/958f39b5f55e440f15372ba67c27b1e6a5e61a7e))
|
|
19
|
+
* Merge branch 'tm-4505-aria-buttons' into 'master' ([190376e](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/190376eef9e7fee44adb9fb6c2c1a753ab65aca2))
|
|
20
|
+
* Merge branch 'tm-4462-newsletter-rever' into 'master' ([d4cf109](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/d4cf109929300d80ab31b277f9b29707b73a9864))
|
|
21
|
+
|
|
1
22
|
## [33.1.10](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v33.1.9...v33.1.10) (2024-07-04)
|
|
2
23
|
|
|
3
24
|
|
package/package.json
CHANGED
|
@@ -159,78 +159,4 @@
|
|
|
159
159
|
padding: 0;
|
|
160
160
|
margin: 0 0.8rem 0.8rem 0.8rem;
|
|
161
161
|
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.showTncFixed {
|
|
165
|
-
> div {
|
|
166
|
-
> div:last-child {
|
|
167
|
-
height: 42px;
|
|
168
|
-
overflow-y: scroll;
|
|
169
|
-
color: #515156;
|
|
170
|
-
font-size: 10px;
|
|
171
|
-
font-style: normal;
|
|
172
|
-
font-weight: 400;
|
|
173
|
-
line-height: 14px;
|
|
174
|
-
padding-right: 1rem;
|
|
175
|
-
|
|
176
|
-
&::-webkit-scrollbar {
|
|
177
|
-
width: 4px;
|
|
178
|
-
border-radius: 2px;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
&::-webkit-scrollbar-track {
|
|
182
|
-
background: #cacaca;
|
|
183
|
-
border-radius: 2px;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
&::-webkit-scrollbar-thumb {
|
|
187
|
-
background: #515156;
|
|
188
|
-
border-radius: 2px;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
@include min(tablet) {
|
|
194
|
-
> div {
|
|
195
|
-
display: grid;
|
|
196
|
-
grid-template-columns: 1fr 20rem;
|
|
197
|
-
grid-template-rows: auto auto;
|
|
198
|
-
|
|
199
|
-
> div:last-of-type {
|
|
200
|
-
grid-column: 1/3;
|
|
201
|
-
grid-row: 2/3;
|
|
202
|
-
display: block;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
> a {
|
|
206
|
-
grid-row: 1/2;
|
|
207
|
-
grid-column: 2/3;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
> div:first-of-type {
|
|
211
|
-
grid-row: 1/2;
|
|
212
|
-
grid-column: 1/2;
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
@include min(tablet) {
|
|
219
|
-
.tncEnable {
|
|
220
|
-
> div {
|
|
221
|
-
gap: 2.4rem;
|
|
222
|
-
|
|
223
|
-
> div {
|
|
224
|
-
gap: 2.4rem;
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
.tncEnable .logo {
|
|
230
|
-
> img {
|
|
231
|
-
min-width: 9.6rem;
|
|
232
|
-
width: 9.6rem;
|
|
233
|
-
height: 9.6rem;
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
}
|
|
162
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable import/no-extraneous-dependencies */
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import {
|
|
3
4
|
Title,
|
|
@@ -8,7 +9,7 @@ import {
|
|
|
8
9
|
} from '@storybook/addon-docs/blocks';
|
|
9
10
|
|
|
10
11
|
import Bonus from '.';
|
|
11
|
-
import
|
|
12
|
+
import getOperatorData from '~tests/factories/relations/operator.factory';
|
|
12
13
|
|
|
13
14
|
export default {
|
|
14
15
|
title: 'Theme/Modules/Bonus/Template One',
|
|
@@ -17,34 +18,13 @@ export default {
|
|
|
17
18
|
operator: {
|
|
18
19
|
name: 'operator',
|
|
19
20
|
type: { name: 'object', required: false },
|
|
20
|
-
defaultValue:
|
|
21
|
+
defaultValue: getOperatorData(),
|
|
21
22
|
description: 'The Operator data object.',
|
|
22
23
|
table: {
|
|
23
24
|
type: { summary: 'object' },
|
|
24
25
|
defaultValue: { summary: '' },
|
|
25
26
|
},
|
|
26
27
|
},
|
|
27
|
-
tncEnable: {
|
|
28
|
-
name: 'TNC',
|
|
29
|
-
type: { name: 'boolean', required: false },
|
|
30
|
-
defaultValue: false,
|
|
31
|
-
description: 'If tnc is enabel we show data for it, if is false we hide data',
|
|
32
|
-
table: {
|
|
33
|
-
type: { summary: 'boolean' },
|
|
34
|
-
defaultValue: { summary: false },
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
tncFixed: {
|
|
38
|
-
name: 'TNC Fixed',
|
|
39
|
-
type: { name: 'boolean', required: false },
|
|
40
|
-
defaultValue: false,
|
|
41
|
-
description:
|
|
42
|
-
'If tnxFix is an arg that help us to show the tnc data in the bottom of component and with scroll',
|
|
43
|
-
table: {
|
|
44
|
-
type: { summary: 'boolean' },
|
|
45
|
-
defaultValue: { summary: false },
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
28
|
showRoundedRating: {
|
|
49
29
|
name: 'showRoundedRating',
|
|
50
30
|
type: { name: 'boolean', required: false },
|
|
@@ -77,7 +57,5 @@ const Template = (args) => <Bonus {...args} />;
|
|
|
77
57
|
|
|
78
58
|
export const Default = Template.bind({});
|
|
79
59
|
Default.args = {
|
|
80
|
-
|
|
81
|
-
tncFixed: false,
|
|
82
|
-
operator: getPageData().relation,
|
|
60
|
+
operator: getOperatorData(),
|
|
83
61
|
};
|
|
@@ -17,22 +17,14 @@ export default function Bonus({
|
|
|
17
17
|
module = {
|
|
18
18
|
name: 'bonus',
|
|
19
19
|
},
|
|
20
|
-
|
|
21
|
-
operator,
|
|
22
|
-
hasCollapse: false,
|
|
23
|
-
onlyMobile: true,
|
|
24
|
-
onlyDesktop: true,
|
|
25
|
-
buttonText: 'Terms and Conditions Apply',
|
|
26
|
-
initOpen: false,
|
|
27
|
-
isFixed: false,
|
|
28
|
-
},
|
|
20
|
+
tncFixed = false,
|
|
29
21
|
width = '120',
|
|
30
22
|
height = '120',
|
|
31
23
|
showRoundedRating = false,
|
|
32
24
|
}) {
|
|
33
25
|
const { logo, bonus, name } = operator || {};
|
|
34
26
|
return (
|
|
35
|
-
<div className={`${styles.operatorBanner || ''}
|
|
27
|
+
<div className={`${styles.operatorBanner || ''}`}>
|
|
36
28
|
<div className={styles.container}>
|
|
37
29
|
<div>
|
|
38
30
|
<PrettyLink
|
|
@@ -62,7 +54,7 @@ export default function Bonus({
|
|
|
62
54
|
</PrettyLink>
|
|
63
55
|
<div className={styles.bonus || ''}>
|
|
64
56
|
<BonusBox item={operator} module="bonus" tracker={module?.type || 'main'} />
|
|
65
|
-
{!
|
|
57
|
+
{!tncFixed && <Tnc isFixed={tncFixed} operator={operator} />}
|
|
66
58
|
</div>
|
|
67
59
|
<OperatorCta
|
|
68
60
|
operator={operator}
|
|
@@ -72,7 +64,7 @@ export default function Bonus({
|
|
|
72
64
|
icon={<FaArrowRight fontSize={20} title="Right-pointing Arrow Icon" />}
|
|
73
65
|
/>
|
|
74
66
|
</div>
|
|
75
|
-
{
|
|
67
|
+
{tncFixed && <Tnc isFixed={tncFixed} operator={operator} />}
|
|
76
68
|
</div>
|
|
77
69
|
</div>
|
|
78
70
|
);
|
|
@@ -93,7 +85,6 @@ Bonus.propTypes = {
|
|
|
93
85
|
status: PropTypes.string,
|
|
94
86
|
}),
|
|
95
87
|
tncFixed: PropTypes.bool,
|
|
96
|
-
tnc: PropTypes.shape({}),
|
|
97
88
|
pageTemplate: PropTypes.string,
|
|
98
89
|
module: PropTypes.shape({
|
|
99
90
|
tracking_link_name: PropTypes.string,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
import MainProvider from '~context/MainProvider';
|
|
11
11
|
|
|
12
12
|
import Bonus from '.';
|
|
13
|
-
import
|
|
13
|
+
import getOperatorData from '~tests/factories/relations/operator.factory';
|
|
14
14
|
|
|
15
15
|
export default {
|
|
16
16
|
title: 'Theme/Modules/Bonus/Template Two',
|
|
@@ -19,23 +19,13 @@ export default {
|
|
|
19
19
|
operator: {
|
|
20
20
|
name: 'operator',
|
|
21
21
|
type: { name: 'object', required: false },
|
|
22
|
-
defaultValue:
|
|
22
|
+
defaultValue: getOperatorData(),
|
|
23
23
|
description: 'The Operator data object.',
|
|
24
24
|
table: {
|
|
25
25
|
type: { summary: 'object' },
|
|
26
26
|
defaultValue: { summary: '' },
|
|
27
27
|
},
|
|
28
28
|
},
|
|
29
|
-
tncEnable: {
|
|
30
|
-
name: 'TNC',
|
|
31
|
-
type: { name: 'boolean', required: false },
|
|
32
|
-
defaultValue: false,
|
|
33
|
-
description: 'If tnc is enabel we show data for it, if is false we hide data',
|
|
34
|
-
table: {
|
|
35
|
-
type: { summary: 'boolean' },
|
|
36
|
-
defaultValue: { summary: false },
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
29
|
tncFixed: {
|
|
40
30
|
name: 'TNC Fixed',
|
|
41
31
|
type: { name: 'boolean', required: false },
|
|
@@ -163,15 +153,13 @@ const Template = (args) => (
|
|
|
163
153
|
versions of Lorem Ipsum.
|
|
164
154
|
</div>
|
|
165
155
|
</main>
|
|
166
|
-
<Bonus {...args}
|
|
156
|
+
<Bonus {...args} />
|
|
167
157
|
</MainProvider>
|
|
168
158
|
);
|
|
169
159
|
|
|
170
160
|
export const Default = Template.bind({});
|
|
171
161
|
Default.args = {
|
|
172
|
-
tncEnable: true,
|
|
173
162
|
tncFixed: false,
|
|
174
|
-
operator:
|
|
175
|
-
floating:
|
|
176
|
-
showOnLoad: true,
|
|
163
|
+
operator: getOperatorData(),
|
|
164
|
+
floating: true,
|
|
177
165
|
};
|
|
@@ -19,15 +19,7 @@ export default function TemplateOne({
|
|
|
19
19
|
module = {
|
|
20
20
|
name: 'bonus',
|
|
21
21
|
},
|
|
22
|
-
|
|
23
|
-
operator,
|
|
24
|
-
hasCollapse: false,
|
|
25
|
-
onlyMobile: true,
|
|
26
|
-
onlyDesktop: true,
|
|
27
|
-
buttonText: 'Terms and Conditions Apply',
|
|
28
|
-
initOpen: false,
|
|
29
|
-
isFixed: false,
|
|
30
|
-
},
|
|
22
|
+
tncFixed = false,
|
|
31
23
|
showWelcomeText = true,
|
|
32
24
|
floating = false,
|
|
33
25
|
closedBanner,
|
|
@@ -55,7 +47,7 @@ export default function TemplateOne({
|
|
|
55
47
|
className={`${styles.operatorBanner || ''} ${!closedBanner ? styles.show : styles.hide} ${
|
|
56
48
|
styles.tncEnable
|
|
57
49
|
}
|
|
58
|
-
${
|
|
50
|
+
${tncFixed ? styles.showTncFixed || '' : ''} ${floating ? styles.floating : ''}`}
|
|
59
51
|
>
|
|
60
52
|
<div className={styles.container}>
|
|
61
53
|
<div>
|
|
@@ -93,7 +85,7 @@ export default function TemplateOne({
|
|
|
93
85
|
)}
|
|
94
86
|
|
|
95
87
|
<BonusBox item={operator} tracker={module?.type || 'main'} />
|
|
96
|
-
{!
|
|
88
|
+
{!tncFixed && <Tnc isFixed={tncFixed} operator={operator} />}
|
|
97
89
|
</div>
|
|
98
90
|
</div>
|
|
99
91
|
|
|
@@ -105,7 +97,7 @@ export default function TemplateOne({
|
|
|
105
97
|
icon={<FaArrowRight fontSize={20} title="Right-pointing Arrow Icon" />}
|
|
106
98
|
translationsObj={translationsObj}
|
|
107
99
|
/>
|
|
108
|
-
{
|
|
100
|
+
{tncFixed && <Tnc isFixed={tncFixed} operator={operator} />}
|
|
109
101
|
<IoMdClose
|
|
110
102
|
className={`${styles.closeBtn || ''}`}
|
|
111
103
|
onClick={clickHandler}
|
|
@@ -135,8 +127,7 @@ TemplateOne.propTypes = {
|
|
|
135
127
|
}),
|
|
136
128
|
status: PropTypes.string,
|
|
137
129
|
}),
|
|
138
|
-
|
|
139
|
-
stickyOffset: PropTypes.number,
|
|
130
|
+
tncFixed: PropTypes.bool,
|
|
140
131
|
floating: PropTypes.bool,
|
|
141
132
|
pageTemplate: PropTypes.string,
|
|
142
133
|
module: PropTypes.shape({
|
|
@@ -37,12 +37,19 @@ const NewsletterForm = ({
|
|
|
37
37
|
getData();
|
|
38
38
|
}, []);
|
|
39
39
|
|
|
40
|
+
function removeTrailingSlash(url) {
|
|
41
|
+
if (url.endsWith('/')) {
|
|
42
|
+
return url.slice(0, -1);
|
|
43
|
+
}
|
|
44
|
+
return url;
|
|
45
|
+
}
|
|
46
|
+
|
|
40
47
|
const bacomApi = async (name, email, phomeNumber) => {
|
|
41
48
|
// eslint-disable-next-line no-bitwise
|
|
42
49
|
const timestamp = (Date.now() / 1000) | 0;
|
|
43
|
-
const refUrl =
|
|
50
|
+
const refUrl = removeTrailingSlash(process.env.GATSBY_SITE_URL);
|
|
44
51
|
const validatePhoneNr = typeof phomeNumber === 'undefined';
|
|
45
|
-
const refName = process.env.
|
|
52
|
+
const refName = getUrl(path)?.replace('https://', '') || process.env.GATSBY_SITE_NAME;
|
|
46
53
|
|
|
47
54
|
await fetch(
|
|
48
55
|
`https://bacom.dk/subscribe/gig/?firstname=${name}&user_ip=${ip}&ref_name=${refName}&ref_url=${refUrl}×tamp=${timestamp}&country=${country}&email=${email}${
|
|
@@ -2,48 +2,24 @@ import React from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import styles from './tnc.module.scss';
|
|
4
4
|
import { getOperatorTnc } from '~helpers/getters';
|
|
5
|
-
import Collapse from '~atoms/collapse';
|
|
6
5
|
|
|
7
|
-
const Tnc = ({
|
|
8
|
-
operator,
|
|
9
|
-
hasCollapse = false,
|
|
10
|
-
onlyMobile = true,
|
|
11
|
-
onlyDesktop = true,
|
|
12
|
-
buttonText = 'Terms and Conditions Apply',
|
|
13
|
-
initOpen = false,
|
|
14
|
-
isFixed = false,
|
|
15
|
-
}) => {
|
|
6
|
+
const Tnc = ({ operator, isFixed = false }) => {
|
|
16
7
|
const termsConditions = getOperatorTnc(operator);
|
|
17
8
|
|
|
18
9
|
return (
|
|
19
10
|
termsConditions && (
|
|
20
|
-
|
|
21
|
-
{
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
contentText={termsConditions}
|
|
27
|
-
initOpen={initOpen}
|
|
28
|
-
/>
|
|
29
|
-
) : (
|
|
30
|
-
<div
|
|
31
|
-
className={isFixed && styles.isFixed ? styles.isFixed : ''}
|
|
32
|
-
dangerouslySetInnerHTML={{ __html: termsConditions }}
|
|
33
|
-
/>
|
|
34
|
-
)}
|
|
35
|
-
</>
|
|
11
|
+
<div
|
|
12
|
+
tabIndex={`${isFixed ? 0 : -1}`}
|
|
13
|
+
className={`${styles.container} ${isFixed ? styles.isFixed : ''}`}
|
|
14
|
+
// eslint-disable-next-line react/no-danger
|
|
15
|
+
dangerouslySetInnerHTML={{ __html: termsConditions }}
|
|
16
|
+
/>
|
|
36
17
|
)
|
|
37
18
|
);
|
|
38
19
|
};
|
|
39
20
|
|
|
40
21
|
Tnc.propTypes = {
|
|
41
|
-
hasCollapse: PropTypes.bool,
|
|
42
22
|
isFixed: PropTypes.bool,
|
|
43
|
-
buttonText: PropTypes.string,
|
|
44
|
-
onlyMobile: PropTypes.bool,
|
|
45
|
-
onlyDesktop: PropTypes.bool,
|
|
46
|
-
initOpen: PropTypes.bool,
|
|
47
23
|
operator: PropTypes.shape({
|
|
48
24
|
short_name: PropTypes.string,
|
|
49
25
|
type: PropTypes.string,
|
|
@@ -4,29 +4,9 @@
|
|
|
4
4
|
flex-basis: 100%;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
.
|
|
12
|
-
text-align: justify;
|
|
13
|
-
padding-right: 1.6rem;
|
|
14
|
-
max-height: 7.2rem;
|
|
15
|
-
flex-basis: 100%;
|
|
16
|
-
&::-webkit-scrollbar {
|
|
17
|
-
-webkit-appearance: none;
|
|
18
|
-
width: 0.4rem;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
&::-webkit-scrollbar-thumb {
|
|
22
|
-
border-radius: 2px;
|
|
23
|
-
background-color: #6B6A72;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/* Track */
|
|
27
|
-
&::-webkit-scrollbar-track {
|
|
28
|
-
background: #e9e9e9;
|
|
29
|
-
border-radius: 2px;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
7
|
+
.container {
|
|
8
|
+
font-size: 1rem;
|
|
9
|
+
font-style: normal;
|
|
10
|
+
font-weight: 400;
|
|
11
|
+
line-height: 1.4rem;
|
|
32
12
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable import/no-extraneous-dependencies */
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import {
|
|
3
4
|
Title,
|
|
@@ -6,106 +7,28 @@ import {
|
|
|
6
7
|
PRIMARY_STORY,
|
|
7
8
|
ArgsTable,
|
|
8
9
|
} from '@storybook/addon-docs/blocks';
|
|
10
|
+
import getOperatorData from '~tests/factories/relations/operator.factory';
|
|
9
11
|
|
|
10
|
-
import Link from '~hooks/link';
|
|
11
|
-
import styles from './tnc.module.scss';
|
|
12
12
|
import Tnc from '.';
|
|
13
13
|
|
|
14
|
-
const tncText = (
|
|
15
|
-
<p>
|
|
16
|
-
18+ New Players only. Play responsibly - 18+ New Players only. Play responsibly - 18+ New
|
|
17
|
-
Players only. Play responsibly -
|
|
18
|
-
<a href="https://www.begambleaware.org/" title="Gamble Aware" target="_blank" rel="noreferrer">
|
|
19
|
-
Begambleaware
|
|
20
|
-
</a>
|
|
21
|
-
. Full
|
|
22
|
-
<Link to="/terms-and-conditions"> Terms </Link>
|
|
23
|
-
Apply.
|
|
24
|
-
</p>
|
|
25
|
-
);
|
|
26
|
-
|
|
27
14
|
export default {
|
|
28
15
|
title: 'Theme/Molecules/Tnc',
|
|
29
16
|
component: Tnc,
|
|
30
17
|
argTypes: {
|
|
31
|
-
hasCollapse: {
|
|
32
|
-
name: 'hasCollapse',
|
|
33
|
-
type: { name: 'boolean', required: false },
|
|
34
|
-
defaultValue: true,
|
|
35
|
-
description:
|
|
36
|
-
'If true, the component will use the `<Collapse />` component and will show a dropdown for the T&C text.',
|
|
37
|
-
table: {
|
|
38
|
-
type: { summary: 'boolean' },
|
|
39
|
-
defaultValue: { summary: true },
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
18
|
isFixed: {
|
|
43
19
|
name: 'isFixed',
|
|
44
20
|
type: { name: 'boolean', required: false },
|
|
45
21
|
defaultValue: false,
|
|
46
|
-
description:
|
|
47
|
-
'If true, will have a fixed height for the T&C text. Will only work if hasCollapsed is set to false.',
|
|
22
|
+
description: 'If true, will have a fixed height for the T&C text.',
|
|
48
23
|
table: {
|
|
49
24
|
type: { summary: 'boolean' },
|
|
50
25
|
defaultValue: { summary: false },
|
|
51
26
|
},
|
|
52
27
|
},
|
|
53
|
-
onlyMobile: {
|
|
54
|
-
name: 'onlyMobile',
|
|
55
|
-
type: { name: 'boolean', required: false },
|
|
56
|
-
defaultValue: true,
|
|
57
|
-
description: 'Related to the `<Collapse />` component, if true, collapsible only on mobile.',
|
|
58
|
-
table: {
|
|
59
|
-
type: { summary: 'boolean' },
|
|
60
|
-
defaultValue: { summary: true },
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
onlyDesktop: {
|
|
64
|
-
name: 'onlyDesktop',
|
|
65
|
-
type: { name: 'boolean', required: false },
|
|
66
|
-
defaultValue: true,
|
|
67
|
-
description: 'Related to the `<Collapse />` component, if true, collapsible only on desktop.',
|
|
68
|
-
table: {
|
|
69
|
-
type: { summary: 'boolean' },
|
|
70
|
-
defaultValue: { summary: true },
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
buttonText: {
|
|
74
|
-
name: 'buttonText',
|
|
75
|
-
type: { name: 'string', required: false },
|
|
76
|
-
defaultValue: 'Terms and Conditions Apply',
|
|
77
|
-
description:
|
|
78
|
-
'Related to the `<Collapse />` component, this is the text that will show when the collapse is closed.',
|
|
79
|
-
table: {
|
|
80
|
-
type: { summary: 'string' },
|
|
81
|
-
defaultValue: { summary: 'Terms and Conditions Apply' },
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
initOpen: {
|
|
85
|
-
name: 'initOpen',
|
|
86
|
-
type: { name: 'boolean', required: false },
|
|
87
|
-
defaultValue: false,
|
|
88
|
-
description:
|
|
89
|
-
'Related to the `<Collapse />` component, Is True, sets the box opened on first load.',
|
|
90
|
-
table: {
|
|
91
|
-
type: { summary: 'boolean' },
|
|
92
|
-
defaultValue: { summary: false },
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
contentText: {
|
|
96
|
-
name: 'contentText',
|
|
97
|
-
type: { name: 'element', required: false },
|
|
98
|
-
defaultValue: '18+ New Players only. Play responsibly.',
|
|
99
|
-
description: 'The actual T&C text to display.',
|
|
100
|
-
table: {
|
|
101
|
-
type: { summary: 'string | element' },
|
|
102
|
-
defaultValue: { summary: '' },
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
28
|
operator: {
|
|
106
29
|
name: 'operator',
|
|
107
30
|
type: { name: 'object', required: false },
|
|
108
|
-
defaultValue:
|
|
31
|
+
defaultValue: getOperatorData(),
|
|
109
32
|
description: 'The operator object, passed for the T&C link.',
|
|
110
33
|
table: {
|
|
111
34
|
type: { summary: 'object' },
|
|
@@ -119,7 +42,7 @@ export default {
|
|
|
119
42
|
parameters: {
|
|
120
43
|
docs: {
|
|
121
44
|
description: {
|
|
122
|
-
component: 'A component to display T&C text and links.
|
|
45
|
+
component: 'A component to display T&C text and links.',
|
|
123
46
|
},
|
|
124
47
|
page: () => (
|
|
125
48
|
<>
|
|
@@ -133,19 +56,10 @@ export default {
|
|
|
133
56
|
},
|
|
134
57
|
};
|
|
135
58
|
|
|
136
|
-
const Template = (args) =>
|
|
137
|
-
<div className={styles.storybook}>
|
|
138
|
-
<Tnc {...args} />
|
|
139
|
-
</div>
|
|
140
|
-
);
|
|
59
|
+
const Template = (args) => <Tnc {...args} />;
|
|
141
60
|
|
|
142
61
|
export const Default = Template.bind({});
|
|
143
62
|
Default.args = {
|
|
144
|
-
hasCollapse: true,
|
|
145
|
-
contentText: tncText,
|
|
146
|
-
onlyMobile: true,
|
|
147
|
-
onlyDesktop: true,
|
|
148
|
-
buttonText: 'Terms and Conditions Apply',
|
|
149
|
-
initOpen: false,
|
|
150
63
|
isFixed: false,
|
|
64
|
+
operator: getOperatorData(),
|
|
151
65
|
};
|
|
@@ -20,25 +20,11 @@ describe('Tnc Component', () => {
|
|
|
20
20
|
const { container } = render(<Tnc {...args} />);
|
|
21
21
|
expect(container).toBeTruthy();
|
|
22
22
|
});
|
|
23
|
-
test('render tnc collapsed', () => {
|
|
24
|
-
const { container } = render(<Tnc {...args} hasCollapse />);
|
|
25
|
-
expect(container.querySelector('button')).toBeTruthy();
|
|
26
|
-
expect(container.querySelector('button').innerHTML).toBe('Terms and Conditions Apply');
|
|
27
|
-
expect(container.querySelector('button').closest('div').querySelector('div').innerHTML).toBe(
|
|
28
|
-
'test'
|
|
29
|
-
);
|
|
30
|
-
expect(container.querySelector('.isFixed')).toBeFalsy();
|
|
31
|
-
});
|
|
32
23
|
test('render tnc fixed', () => {
|
|
33
24
|
const { container } = render(<Tnc {...args} hasCollapse={false} isFixed />);
|
|
34
25
|
expect(container.querySelector('.isFixed')).toBeTruthy();
|
|
35
26
|
expect(container.querySelector('.isFixed').innerHTML).toBe('test');
|
|
36
27
|
});
|
|
37
|
-
test('render tnc not fixed not collapsed', () => {
|
|
38
|
-
const { container } = render(<Tnc {...args} hasCollapse={false} isFixed={false} />);
|
|
39
|
-
expect(container.querySelector('.isFixed')).toBeFalsy();
|
|
40
|
-
expect(container.querySelector('div').innerHTML).toBe('test');
|
|
41
|
-
});
|
|
42
28
|
});
|
|
43
29
|
afterEach(() => {
|
|
44
30
|
cleanup();
|
package/src/helpers/getters.mjs
CHANGED
|
@@ -305,8 +305,7 @@ export function getGameIframe(relation, language = null) {
|
|
|
305
305
|
}
|
|
306
306
|
|
|
307
307
|
export function getOperatorTnc(operator){
|
|
308
|
-
|
|
309
|
-
return main?.terms_and_conditions_enabled ? main?.terms_and_conditions : null;
|
|
308
|
+
return operator?.one_liners?.main?.terms_and_conditions_enabled ? operator.one_liners?.main?.terms_and_conditions : null;
|
|
310
309
|
}
|
|
311
310
|
|
|
312
311
|
export function isTandcEnabled(extraFields) {
|
package/src/helpers/schema.js
CHANGED
|
@@ -304,37 +304,6 @@ export function organizationSchema(page, pageImage) {
|
|
|
304
304
|
sameAs: socialLinks
|
|
305
305
|
.map((socialLink) => page.siteSchema?.[socialLink])
|
|
306
306
|
.filter((socialLink) => socialLink),
|
|
307
|
-
parentOrganization: {
|
|
308
|
-
'@type': 'Organization',
|
|
309
|
-
logo: {
|
|
310
|
-
'@type': 'imageObject',
|
|
311
|
-
url: 'https://www.gentoomedia.com/wp-content/themes/gentoomedia.com/assets/images/icons/beak-logo.svg',
|
|
312
|
-
},
|
|
313
|
-
name: 'Gentoo Media',
|
|
314
|
-
alternateName: 'G2M',
|
|
315
|
-
address: {
|
|
316
|
-
'@type': 'PostalAddress',
|
|
317
|
-
streetAddress: '@GiG Beach, Triq Id-Dragunara',
|
|
318
|
-
addressLocality: "Saint Julian's",
|
|
319
|
-
postalCode: 'STJ 3148',
|
|
320
|
-
addressCountry: 'MT',
|
|
321
|
-
},
|
|
322
|
-
knowsAbout: {
|
|
323
|
-
'@type': 'Thing',
|
|
324
|
-
name: 'IGaming Business',
|
|
325
|
-
sameAs: [
|
|
326
|
-
'https://en.wikipedia.org/wiki/IGaming_Business',
|
|
327
|
-
'https://www.google.com/search?q=igaming+business',
|
|
328
|
-
],
|
|
329
|
-
},
|
|
330
|
-
sameAs: [
|
|
331
|
-
'https://www.facebook.com/gentoomedia/',
|
|
332
|
-
'https://x.com/gentoomedia',
|
|
333
|
-
'https://www.linkedin.com/company/gentoomedia/',
|
|
334
|
-
'https://www.instagram.com/gentoosocial/',
|
|
335
|
-
'https://www.gentoomedia.com/',
|
|
336
|
-
],
|
|
337
|
-
},
|
|
338
307
|
};
|
|
339
308
|
|
|
340
309
|
return JSON.stringify(generateSchemaObject(schema));
|
|
@@ -12,6 +12,14 @@ export default function getOperatorData(status = 'active') {
|
|
|
12
12
|
short_name: 'rizk',
|
|
13
13
|
type: 'casino',
|
|
14
14
|
iframe: 'https://www.youtube.com/embed/DU1Pio4n_N0',
|
|
15
|
+
logo: {
|
|
16
|
+
width: '412',
|
|
17
|
+
height: '412',
|
|
18
|
+
title: 'Betibet logo',
|
|
19
|
+
alt: 'logo image for betibet',
|
|
20
|
+
url: 'https://assets-srv.s3.eu-west-1.amazonaws.com/1680163403/betibet-logo.png',
|
|
21
|
+
filename: '1680163403/betibet-logo.png',
|
|
22
|
+
},
|
|
15
23
|
software: '',
|
|
16
24
|
ribbons: ['1', '2'],
|
|
17
25
|
bonus: {
|
|
@@ -48,6 +56,9 @@ export default function getOperatorData(status = 'active') {
|
|
|
48
56
|
one_liners: {
|
|
49
57
|
main: {
|
|
50
58
|
one_liner: '100% Bonus + 50 free spins',
|
|
59
|
+
terms_and_conditions:
|
|
60
|
+
'<p>Indbetaling (min. 50 kr.) matches i væddemålskreditter (maks. (1.000 kr.). Væddemålskredit klar til brug ved afgørelse af væddemål til værdien af den kvalificerende indbetaling. Undt. for min. odds, væddemål og betalingsmetode gælder. Gevinst eks. indsats for væddemålskredit. Tidsbegr. & regler gælder.</p>',
|
|
61
|
+
terms_and_conditions_enabled: true,
|
|
51
62
|
},
|
|
52
63
|
},
|
|
53
64
|
};
|