gatsby-matrix-theme 7.0.4 → 7.1.2
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 +43 -0
- package/package.json +2 -2
- package/src/components/atoms/cards/base-card/base-card.module.scss +5 -4
- package/src/components/atoms/cards/base-card/index.js +12 -7
- package/src/components/atoms/cards/operator-card/index.js +1 -1
- package/src/components/atoms/cards/popup-card/index.js +2 -7
- package/src/components/atoms/newsletter/form/index.js +88 -14
- package/src/components/atoms/newsletter/form/newsletter-form.module.scss +20 -29
- package/src/components/atoms/newsletter/privacy&button/index.js +19 -0
- package/src/components/atoms/newsletter/privacy&button/newsletter-privacy&button.module.scss +15 -0
- package/src/components/molecules/newsletter/index.js +13 -3
- package/src/gatsby-core-theme/components/atoms/bonus/index.js +3 -4
- package/storybook/public/152.be31aa82.iframe.bundle.js +7 -0
- package/storybook/public/{152.34ac9544.iframe.bundle.js.LICENSE.txt → 152.be31aa82.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook/public/{152.34ac9544.iframe.bundle.js.map → 152.be31aa82.iframe.bundle.js.map} +1 -1
- package/storybook/public/iframe.html +1 -1
- package/storybook/public/main.8917cebd.iframe.bundle.js +1 -0
- package/storybook/public/152.34ac9544.iframe.bundle.js +0 -7
- package/storybook/public/main.aea3939f.iframe.bundle.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,46 @@
|
|
|
1
|
+
## [7.1.2](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v7.1.1...v7.1.2) (2022-05-18)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Config
|
|
5
|
+
|
|
6
|
+
* update core theme ([7f208e4](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/7f208e4045fbf260eab56ac1bfe261d4c5c4ee1c))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
* Merge branch 'update-core-version' into 'master' ([bf2ae7f](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/bf2ae7f51c1a321a5fc9aa62758a0ffcbfec1414))
|
|
10
|
+
|
|
11
|
+
## [7.1.1](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v7.1.0...v7.1.1) (2022-05-18)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* featured image for google crawler ([4978292](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/49782922e7f106f3306b0781c036c2500b238bbd))
|
|
17
|
+
* updated to latest core version ([47dc76f](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/47dc76f2dfd6aa6dd411815d4e337112f4cec183))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
* Merge branch 'tm-2782-featured-image-fix' into 'master' ([23d42f8](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/23d42f877b346d9ed0a20748e2f4e84ff606f396))
|
|
21
|
+
|
|
22
|
+
# [7.1.0](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v7.0.4...v7.1.0) (2022-05-18)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* add design ([d91051e](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/d91051ebf129f4d38f15c15755a91bdc237bfd4a))
|
|
28
|
+
* add form module to make it reusable ([d195203](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/d195203b93fcd8174b0dafc660c13478973ae520))
|
|
29
|
+
* create an object for string props ([6667979](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/66679796955539989478575e9f4d525d6e8f2045))
|
|
30
|
+
* make file more reusable ([1278885](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/12788854e6e493b48863559ebea42cf96eb2577a))
|
|
31
|
+
* the undefined returning ([6519f88](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/6519f88f67dd399a21e5aaff2c87f867549ca037))
|
|
32
|
+
* used button component ([7fcbbdc](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/7fcbbdcc3b6dea27ab1ab2007e9250c7553112c6))
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
* Merge branch 'tm-2563-sign-up-form-and-bacom' into 'master' ([d750bdb](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/d750bdb4151657211afeda86afee206fa0d0ae7b))
|
|
36
|
+
* Merge branch 'tm-2895-undefined-bonus-one-linter-for-il-pop-up' into 'master' ([3e30db5](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/3e30db549ad84a4111f6a7d12a67f33ee52e6b19))
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
### Features
|
|
40
|
+
|
|
41
|
+
* update singup ([eb49db1](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/eb49db11da3bfbbf97f72ca0ce556162f09bf978))
|
|
42
|
+
* update singup, made it more reusable ([e43e06b](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/e43e06b177bf11ec32f21744289314092c916349))
|
|
43
|
+
|
|
1
44
|
## [7.0.4](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v7.0.3...v7.0.4) (2022-05-11)
|
|
2
45
|
|
|
3
46
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gatsby-matrix-theme",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.1.2",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"description": "Matrix Theme NPM Package",
|
|
6
6
|
"author": "",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"react": "^17.0.2",
|
|
30
30
|
"gatsby-plugin-sitemap": "^3.3.0",
|
|
31
31
|
"react-dom": "^17.0.2",
|
|
32
|
-
"gatsby-core-theme": "^7.0.
|
|
32
|
+
"gatsby-core-theme": "^7.0.6"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@babel/core": "^7.13.1",
|
|
@@ -40,8 +40,7 @@
|
|
|
40
40
|
position: absolute;
|
|
41
41
|
left: 0;
|
|
42
42
|
top: 0;
|
|
43
|
-
.cardBackground
|
|
44
|
-
.overlay {
|
|
43
|
+
.cardBackground {
|
|
45
44
|
width: 100%;
|
|
46
45
|
height: 100%;
|
|
47
46
|
border-radius: var(--border-radius);
|
|
@@ -50,8 +49,10 @@
|
|
|
50
49
|
top: 0;
|
|
51
50
|
object-fit: cover;
|
|
52
51
|
}
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
|
|
53
|
+
> img {
|
|
54
|
+
width: 100%;
|
|
55
|
+
height: 100%;
|
|
55
56
|
}
|
|
56
57
|
}
|
|
57
58
|
.cardWrapper {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
2
3
|
import PropTypes from 'prop-types';
|
|
3
4
|
import Link from 'gatsby-core-theme/src/hooks/link';
|
|
4
|
-
import
|
|
5
|
-
|
|
5
|
+
import LazyImage from '~hooks/lazy-image';
|
|
6
6
|
import styles from './base-card.module.scss';
|
|
7
7
|
|
|
8
8
|
const BaseCard = ({
|
|
@@ -14,11 +14,16 @@ const BaseCard = ({
|
|
|
14
14
|
backgroundImage = null,
|
|
15
15
|
}) => {
|
|
16
16
|
const { path, title } = item;
|
|
17
|
-
const imgContent = (
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
const imgContent = backgroundImage ? (
|
|
18
|
+
<LazyImage
|
|
19
|
+
src={`../../../../../../images/${backgroundImage}`}
|
|
20
|
+
alt={title}
|
|
21
|
+
width={321}
|
|
22
|
+
height={360}
|
|
23
|
+
target="_blank"
|
|
24
|
+
/>
|
|
25
|
+
) : (
|
|
26
|
+
<></>
|
|
22
27
|
);
|
|
23
28
|
|
|
24
29
|
return (
|
|
@@ -25,7 +25,7 @@ const OperatorCard = ({
|
|
|
25
25
|
const reviewPath = path || relation.path;
|
|
26
26
|
const status = relation?.status;
|
|
27
27
|
const isInactive = status === 'inactive';
|
|
28
|
-
const backgroundImage = number === 1 ? '
|
|
28
|
+
const backgroundImage = number === 1 ? 'default-article.webp' : null;
|
|
29
29
|
const logUrlObject = relation?.logo_url_object;
|
|
30
30
|
const { translations } = useContext(Context) || {};
|
|
31
31
|
const StarRating = useOneStarRating
|
|
@@ -5,6 +5,7 @@ import OperatorCta from 'gatsby-core-theme/src/components/atoms/operator-cta';
|
|
|
5
5
|
import { getAltText, imagePrettyUrl, translate } from 'gatsby-core-theme/src/helpers/getters';
|
|
6
6
|
import Tnc from 'gatsby-core-theme/src/components/molecules/tnc';
|
|
7
7
|
import StarRating from 'gatsby-core-theme/src/components/molecules/star-rating';
|
|
8
|
+
import Bonus from 'gatsby-core-theme/src/components/atoms/bonus';
|
|
8
9
|
import LazyImage from '~hooks/lazy-image';
|
|
9
10
|
import Link from '~hooks/link';
|
|
10
11
|
import styles from './popup-card.module.scss';
|
|
@@ -21,12 +22,7 @@ const PopupCard = ({
|
|
|
21
22
|
|
|
22
23
|
const { logo_url: logoUrl, name } = item;
|
|
23
24
|
const oneLiner = item?.one_liners?.main?.one_liner;
|
|
24
|
-
const secondLiner = item?.one_liners?.secondary?.one_liner;
|
|
25
25
|
const tnc = item?.extra_fields?.terms_and_conditions_text_enabled;
|
|
26
|
-
const [one, second] = (oneLiner?.includes('+') && oneLiner?.split('+')) || [
|
|
27
|
-
oneLiner,
|
|
28
|
-
secondLiner,
|
|
29
|
-
];
|
|
30
26
|
const logUrlObject = item?.logo_url_object;
|
|
31
27
|
|
|
32
28
|
return (
|
|
@@ -42,8 +38,7 @@ const PopupCard = ({
|
|
|
42
38
|
{showName && <p className={styles.name}>{name}</p>}
|
|
43
39
|
</div>
|
|
44
40
|
<div className={styles.textContainer}>
|
|
45
|
-
<
|
|
46
|
-
<p className={styles.secondaryText}>{`+${second}`}</p>
|
|
41
|
+
<Bonus item={item} tracker={tracker} />
|
|
47
42
|
</div>
|
|
48
43
|
<div className={styles.buttonContainer}>
|
|
49
44
|
<OperatorCta
|
|
@@ -4,22 +4,41 @@ import React, { useRef, useState, useEffect, useContext } from 'react';
|
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import { Context } from 'gatsby-core-theme/src/context/TranslationsProvider';
|
|
6
6
|
import { translate } from 'gatsby-core-theme/src/helpers/getters';
|
|
7
|
+
import PrivacyandSuccess from '../privacy&button/index';
|
|
7
8
|
import styles from './newsletter-form.module.scss';
|
|
8
9
|
|
|
9
10
|
const NewsletterForm = ({
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
handleApi,
|
|
12
|
+
mainText,
|
|
13
|
+
subscribeText,
|
|
14
|
+
setErr,
|
|
13
15
|
redirectUrl,
|
|
16
|
+
formText = {
|
|
17
|
+
placeholderName: 'John Doe',
|
|
18
|
+
placeholderEmail: 'johndoe@email.com',
|
|
19
|
+
placeholderPhoneNumber: '123456789',
|
|
20
|
+
buttonText: 'Submit',
|
|
21
|
+
textAboveEmail: 'Email address',
|
|
22
|
+
textAboveName: 'Your name',
|
|
23
|
+
textAbovePhoneNumber: 'Phone number',
|
|
24
|
+
mainText,
|
|
25
|
+
subscribeText,
|
|
26
|
+
redirectUrl,
|
|
27
|
+
},
|
|
14
28
|
}) => {
|
|
29
|
+
// eslint-disable-next-line react/destructuring-assignment
|
|
30
|
+
|
|
15
31
|
const form = useRef(null);
|
|
16
32
|
const [ip, setIP] = useState('');
|
|
17
33
|
const [error, setError] = useState(false);
|
|
34
|
+
const [toggleSubscribe, setToggleSubscribe] = useState(false);
|
|
18
35
|
const { translations } = useContext(Context) || {};
|
|
19
36
|
|
|
20
37
|
const validationForm = (e) => {
|
|
21
38
|
let nameValidate = false;
|
|
22
39
|
let emailValidate = false;
|
|
40
|
+
let numberValidate = false;
|
|
41
|
+
|
|
23
42
|
if (!e.name.value && e.name.value.trim() === '') {
|
|
24
43
|
nameValidate = false;
|
|
25
44
|
e.name.classList.add(styles.error);
|
|
@@ -35,7 +54,17 @@ const NewsletterForm = ({
|
|
|
35
54
|
emailValidate = true;
|
|
36
55
|
e.email.classList.remove(styles.error);
|
|
37
56
|
}
|
|
38
|
-
|
|
57
|
+
|
|
58
|
+
if (!e.phone.value && e.phone.value.trim() === '') {
|
|
59
|
+
numberValidate = false;
|
|
60
|
+
e.phone.classList.add(styles.error);
|
|
61
|
+
} else {
|
|
62
|
+
numberValidate = true;
|
|
63
|
+
e.phone.classList.remove(styles.error);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if (nameValidate && emailValidate && numberValidate) {
|
|
67
|
+
setToggleSubscribe(true);
|
|
39
68
|
return true;
|
|
40
69
|
}
|
|
41
70
|
return false;
|
|
@@ -59,7 +88,6 @@ const NewsletterForm = ({
|
|
|
59
88
|
const bacomApi = async (name, email) => {
|
|
60
89
|
// eslint-disable-next-line no-bitwise
|
|
61
90
|
const timestamp = (Date.now() / 1000) | 0;
|
|
62
|
-
|
|
63
91
|
await fetch(
|
|
64
92
|
`https://bacom.dk/subscribe/gig/?firstname=${name}&user_ip=${ip}&ref_name=${process.env.BACOM_REF_NAME}&ref_url=${process.env.BACOM_REF_URL}×tamp=${timestamp}&country=${process.env.COUNTRY}&email=${email}`,
|
|
65
93
|
{
|
|
@@ -76,28 +104,61 @@ const NewsletterForm = ({
|
|
|
76
104
|
);
|
|
77
105
|
};
|
|
78
106
|
|
|
107
|
+
if (setErr) {
|
|
108
|
+
setError(true);
|
|
109
|
+
}
|
|
110
|
+
|
|
79
111
|
const handelSubmit = (e) => {
|
|
80
112
|
e.preventDefault();
|
|
81
113
|
const { elements } = e.target;
|
|
82
114
|
if (validationForm(elements)) {
|
|
83
|
-
|
|
115
|
+
handleApi
|
|
116
|
+
? handleApi(elements.name.value, elements.email.value, ip)
|
|
117
|
+
: bacomApi(elements.name.value, elements.email.value);
|
|
84
118
|
}
|
|
85
119
|
};
|
|
86
120
|
|
|
87
121
|
return (
|
|
88
122
|
<>
|
|
123
|
+
{toggleSubscribe ? (
|
|
124
|
+
<h1>Thank you</h1>
|
|
125
|
+
) : (
|
|
126
|
+
<h1 className={styles.maintext}>{formText.mainText}</h1>
|
|
127
|
+
)}
|
|
128
|
+
{toggleSubscribe ? <p dangerouslySetInnerHTML={{ __html: formText.subscribeText }} /> : null}
|
|
89
129
|
{!error ? (
|
|
90
130
|
<form ref={form} onSubmit={handelSubmit}>
|
|
91
|
-
|
|
131
|
+
{formText.textAboveName ? (
|
|
132
|
+
<p className={styles.textAboveInput}>{formText.textAboveName}</p>
|
|
133
|
+
) : null}
|
|
134
|
+
|
|
135
|
+
<input
|
|
136
|
+
className={styles.input}
|
|
137
|
+
placeholder={formText.placeholderName}
|
|
138
|
+
type="text"
|
|
139
|
+
name="name"
|
|
140
|
+
/>
|
|
141
|
+
{formText.textAboveEmail ? (
|
|
142
|
+
<p className={styles.textAboveInput}>{formText.textAboveEmail}</p>
|
|
143
|
+
) : null}
|
|
144
|
+
|
|
92
145
|
<input
|
|
93
146
|
className={styles.input}
|
|
94
|
-
placeholder={placeholderEmail}
|
|
147
|
+
placeholder={formText.placeholderEmail}
|
|
95
148
|
type="email"
|
|
96
149
|
name="email"
|
|
97
150
|
/>
|
|
98
|
-
|
|
99
|
-
{
|
|
100
|
-
|
|
151
|
+
{formText.textAbovePhoneNumber ? (
|
|
152
|
+
<p className={styles.textAboveInput}>{formText.textAbovePhoneNumber}</p>
|
|
153
|
+
) : null}
|
|
154
|
+
|
|
155
|
+
<input
|
|
156
|
+
className={styles.input}
|
|
157
|
+
placeholder={formText.placeholderPhoneNumber}
|
|
158
|
+
type="tel"
|
|
159
|
+
name="phone"
|
|
160
|
+
/>
|
|
161
|
+
<PrivacyandSuccess privacyText={formText.privacyText} />
|
|
101
162
|
</form>
|
|
102
163
|
) : (
|
|
103
164
|
<span>
|
|
@@ -112,9 +173,22 @@ const NewsletterForm = ({
|
|
|
112
173
|
);
|
|
113
174
|
};
|
|
114
175
|
NewsletterForm.propTypes = {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
176
|
+
// eslint-disable-next-line react/forbid-prop-types
|
|
177
|
+
formText: (PropTypes.formText = {
|
|
178
|
+
placeholderName: PropTypes.string,
|
|
179
|
+
placeholderEmail: PropTypes.string,
|
|
180
|
+
buttonText: PropTypes.string,
|
|
181
|
+
placeholderPhoneNumber: PropTypes.string,
|
|
182
|
+
textAboveEmail: PropTypes.string,
|
|
183
|
+
textAboveName: PropTypes.string,
|
|
184
|
+
textAbovePhoneNumber: PropTypes.string,
|
|
185
|
+
privacyText: PropTypes.string,
|
|
186
|
+
}),
|
|
187
|
+
handleApi: PropTypes.func,
|
|
188
|
+
setErr: PropTypes.bool,
|
|
189
|
+
mainText: PropTypes.string,
|
|
190
|
+
subscribeText: PropTypes.string,
|
|
118
191
|
redirectUrl: PropTypes.string,
|
|
119
192
|
};
|
|
193
|
+
|
|
120
194
|
export default NewsletterForm;
|
|
@@ -1,29 +1,20 @@
|
|
|
1
|
-
form{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
font-size: 1.5rem;
|
|
22
|
-
min-width: 25.6rem;
|
|
23
|
-
border-radius: 0.25rem;
|
|
24
|
-
height: 4.4rem;
|
|
25
|
-
}
|
|
26
|
-
.error{
|
|
27
|
-
border:1px solid #ff0036;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
1
|
+
form {
|
|
2
|
+
@include min(tablet) {
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
}
|
|
6
|
+
.input {
|
|
7
|
+
padding: 1.2rem;
|
|
8
|
+
border: 0;
|
|
9
|
+
border-radius: 0.5rem;
|
|
10
|
+
background-color: #f3f2f2;
|
|
11
|
+
font-size: 1.4rem;
|
|
12
|
+
margin-right: 1rem;
|
|
13
|
+
width: 100%;
|
|
14
|
+
margin-bottom: 1rem;
|
|
15
|
+
height: 4.4rem;
|
|
16
|
+
}
|
|
17
|
+
.error {
|
|
18
|
+
border: 1px solid #ff0036;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import Button from 'gatsby-core-theme/src/components/atoms/button';
|
|
4
|
+
import styles from './newsletter-privacy&button.module.scss';
|
|
5
|
+
|
|
6
|
+
const PrivacyandSuccess = ({ privacyText }) => (
|
|
7
|
+
<div className={styles.display}>
|
|
8
|
+
{privacyText ? (
|
|
9
|
+
<p className={styles.privacytext} dangerouslySetInnerHTML={{ __html: privacyText }} />
|
|
10
|
+
) : null}
|
|
11
|
+
<Button className={styles.button} btnText="Submit" isButton />
|
|
12
|
+
</div>
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
PrivacyandSuccess.propTypes = {
|
|
16
|
+
privacyText: PropTypes.string,
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export default PrivacyandSuccess;
|
|
@@ -6,7 +6,6 @@ import React, { useState, useRef } from 'react';
|
|
|
6
6
|
import { MdClose } from 'react-icons/md';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import { debounce } from 'gatsby-core-theme/src/helpers/scroll';
|
|
9
|
-
|
|
10
9
|
import { getUrl } from 'gatsby-core-theme/src/helpers/getters';
|
|
11
10
|
import Button from '../../atoms/newsletter/toggle-button/index';
|
|
12
11
|
import Form from '../../atoms/newsletter/form/index';
|
|
@@ -17,7 +16,11 @@ const Newsletter = ({
|
|
|
17
16
|
mainText = 'You get more than 405 free spins',
|
|
18
17
|
subscribeText = 'Subscribe to our newsletter and get more than 405 free spins instantly.',
|
|
19
18
|
placeholderName = 'Name',
|
|
19
|
+
textAboveName = 'Name',
|
|
20
20
|
placeholderEmail = 'Email',
|
|
21
|
+
textAboveEmail = 'Something to be added',
|
|
22
|
+
placeholderPhoneNumber = '00000000',
|
|
23
|
+
textAbovePhoneNumber = 'Something to be added',
|
|
21
24
|
privacyText = 'By subscribing, you confirm that you are over 18 years of age and that you accept our',
|
|
22
25
|
openBtnText = 'FÅ 405 FREE SPINS UMIDDELBART',
|
|
23
26
|
buttonText = 'Hent dine freespins',
|
|
@@ -42,7 +45,7 @@ const Newsletter = ({
|
|
|
42
45
|
) {
|
|
43
46
|
setToggleOnScroll(true);
|
|
44
47
|
} else {
|
|
45
|
-
|
|
48
|
+
setToggleNewsletter(false);
|
|
46
49
|
setToggleOnScroll(false);
|
|
47
50
|
}
|
|
48
51
|
}
|
|
@@ -81,7 +84,11 @@ const Newsletter = ({
|
|
|
81
84
|
{subscribeText ? <p className={styles.subscribe}>{subscribeText}</p> : null}
|
|
82
85
|
<Form
|
|
83
86
|
placeholderName={placeholderName}
|
|
87
|
+
textAboveName={textAboveName}
|
|
84
88
|
placeholderEmail={placeholderEmail}
|
|
89
|
+
textAboveEmail={textAboveEmail}
|
|
90
|
+
placeholderPhoneNumber={placeholderPhoneNumber}
|
|
91
|
+
textAbovePhoneNumber={textAbovePhoneNumber}
|
|
85
92
|
buttonText={buttonText}
|
|
86
93
|
redirectUrl={redirectUrl}
|
|
87
94
|
/>
|
|
@@ -100,10 +107,14 @@ Newsletter.propTypes = {
|
|
|
100
107
|
mainText: PropTypes.string,
|
|
101
108
|
subscribeText: PropTypes.string,
|
|
102
109
|
placeholderName: PropTypes.string,
|
|
110
|
+
textAboveName: PropTypes.string,
|
|
103
111
|
placeholderEmail: PropTypes.string,
|
|
104
112
|
privacyText: PropTypes.string,
|
|
105
113
|
openBtnText: PropTypes.string,
|
|
106
114
|
buttonText: PropTypes.string,
|
|
115
|
+
textAboveEmail: PropTypes.string,
|
|
116
|
+
placeholderPhoneNumber: PropTypes.string,
|
|
117
|
+
textAbovePhoneNumber: PropTypes.string,
|
|
107
118
|
page: PropTypes.shape({
|
|
108
119
|
path: PropTypes.string,
|
|
109
120
|
template: PropTypes.string,
|
|
@@ -111,5 +122,4 @@ Newsletter.propTypes = {
|
|
|
111
122
|
hideButtonOnScroll: PropTypes.bool,
|
|
112
123
|
footer: PropTypes.bool,
|
|
113
124
|
};
|
|
114
|
-
|
|
115
125
|
export default Newsletter;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { getBonus } from 'gatsby-core-theme/src/helpers/getters';
|
|
4
3
|
import styles from './bonus.module.scss';
|
|
5
4
|
|
|
6
|
-
export default function Bonus({ item
|
|
7
|
-
const oneLiner =
|
|
5
|
+
export default function Bonus({ item }) {
|
|
6
|
+
const oneLiner = item?.one_liners?.main;
|
|
8
7
|
const isInoperative = item?.status === 'inactive';
|
|
9
8
|
if (!oneLiner) {
|
|
10
9
|
return <></>;
|
|
@@ -30,6 +29,6 @@ export default function Bonus({ item, tracker }) {
|
|
|
30
29
|
Bonus.propTypes = {
|
|
31
30
|
item: PropTypes.shape({
|
|
32
31
|
status: PropTypes.string,
|
|
32
|
+
one_liners: PropTypes.string,
|
|
33
33
|
}),
|
|
34
|
-
tracker: PropTypes.string,
|
|
35
34
|
};
|