gatsby-core-theme 1.6.4 → 1.6.8
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 +50 -0
- package/gatsby-node.esm.js +2 -2
- package/package.json +2 -2
- package/src/components/atoms/author/index.js +7 -1
- package/src/components/atoms/author-box/index.js +1 -0
- package/src/components/atoms/logo/index.js +1 -0
- package/src/components/atoms/menu/items/item/index.js +6 -1
- package/src/components/atoms/open-graph/index.js +2 -0
- package/src/components/molecules/link-list/index.js +20 -20
- package/src/components/molecules/link-list/link-list.stories.js +2 -2
- package/src/components/molecules/operator-banner/index.js +1 -0
- package/src/components/molecules/pagination/with-midpoints.js +4 -0
- package/src/components/molecules/toplist/default-row/index.js +1 -0
- package/src/components/organisms/form/form.module.scss +22 -20
- package/src/components/organisms/form/index.js +27 -6
- package/src/components/organisms/head/index.js +15 -3
- package/src/components/organisms/navigation/index.js +6 -1
- package/src/components/pages/tracker/index.js +4 -1
- package/src/hooks/tabs/index.js +1 -1
- package/src/hooks/tabs/tab/tab-list.js +1 -1
- package/src/pages/404/404.test.js +3 -3
- package/src/styles/utils/variables/_colors.scss +1 -0
- package/tests/factories/modules/contact-us-authors.factory.js +59 -0
- package/tests/factories/modules/site-schema.factory.js +17 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,53 @@
|
|
|
1
|
+
## [1.6.8](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v1.6.7...v1.6.8) (2021-11-24)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* non main trackers ([adb1c71](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/adb1c71f34e7bc552696b358ea1cbbccf7b3d2e3))
|
|
7
|
+
|
|
8
|
+
## [1.6.7](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v1.6.6...v1.6.7) (2021-11-24)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* added translations to the archive page and fixes for link list ([69ebe2e](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/69ebe2ef1fea637a093436ab015aa26058f9fde1))
|
|
14
|
+
* fix some more links without accessible name ([2e8f905](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/2e8f9053369a69c67935e45490f3c5cafdebd4c1))
|
|
15
|
+
* fixes on accesibility ([6689ff1](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/6689ff182b750ef70143bdce779889805d88be02))
|
|
16
|
+
* tab change lazyload issue ([a1c30c2](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/a1c30c2a98a23048f653cd0d56f9a17d0e7affbd))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Code Refactoring
|
|
20
|
+
|
|
21
|
+
* fixes on accessbility ([de7482a](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/de7482ae746bc60e8939ed6031a6b883f61e2954))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Config
|
|
25
|
+
|
|
26
|
+
* changing sitename for testing purposes ([391c01c](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/391c01c7668771feacb551c4ae4e022c7c90db93))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
* Merge branch 'tm-2605-translations-in-archive' into 'master' ([9be0770](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/9be07704de3e011af549f76ff67e570264766dc0))
|
|
30
|
+
* Merge branch 'tm-2595-accessibility-scores' into 'master' ([c63653f](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/c63653f1bdac5e6abfa5a49d9029b7de8cd23e33))
|
|
31
|
+
* Merge branch 'tm-2478-search' into 'master' ([a4fbd15](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/a4fbd1528bcf9cde03dc2097e9b79c618a0f544a))
|
|
32
|
+
|
|
33
|
+
## [1.6.6](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v1.6.5...v1.6.6) (2021-11-23)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Bug Fixes
|
|
37
|
+
|
|
38
|
+
* added captcha on form ([a85dcb1](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/a85dcb1b6aa405cab07b4e2d235e63bb189f9511))
|
|
39
|
+
* general fixes ([80bab76](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/80bab7614074a770f0d97a3c3499086701fe7bda))
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
* Merge branch 'tm-2565-contact-us-page' into 'master' ([0563d78](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/0563d781911004f3fb370e96fcca76066405cd60))
|
|
43
|
+
|
|
44
|
+
## [1.6.5](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v1.6.4...v1.6.5) (2021-11-22)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
### Bug Fixes
|
|
48
|
+
|
|
49
|
+
* manu item image width and height ([799be5b](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/799be5b2e2e54a21e5d5beb00c9eec7a152d7560))
|
|
50
|
+
|
|
1
51
|
## [1.6.4](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v1.6.3...v1.6.4) (2021-11-22)
|
|
2
52
|
|
|
3
53
|
|
package/gatsby-node.esm.js
CHANGED
|
@@ -72,7 +72,7 @@ function createArchivePage(pageObject, marketSections, prefilledModules, createP
|
|
|
72
72
|
createPage({
|
|
73
73
|
path: page.path,
|
|
74
74
|
component: require.resolve(appName),
|
|
75
|
-
context: { page, marketSections, prefilledModules, siteInfo },
|
|
75
|
+
context: { page, marketSections, prefilledModules, siteInfo, translations },
|
|
76
76
|
});
|
|
77
77
|
});
|
|
78
78
|
} else {
|
|
@@ -84,7 +84,7 @@ function createArchivePage(pageObject, marketSections, prefilledModules, createP
|
|
|
84
84
|
createPage({
|
|
85
85
|
path: page.path,
|
|
86
86
|
component: require.resolve(appName),
|
|
87
|
-
context: { page, marketSections, prefilledModules, siteInfo },
|
|
87
|
+
context: { page, marketSections, prefilledModules, siteInfo, translations },
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
90
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gatsby-core-theme",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.8",
|
|
4
4
|
"description": "Gatsby Theme NPM Package",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"GATSBY_RECAPTCHA_SITEKEY": "6LfoyvMUAAAAAO4nl_MQnqHb4XdHxEiu5cXgIqeB",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"react": "^17.0.2",
|
|
58
58
|
"react-cookies": "^0.1.1",
|
|
59
59
|
"react-dom": "^17.0.2",
|
|
60
|
-
"react-google-recaptcha": "^2.0
|
|
60
|
+
"react-google-recaptcha": "^2.1.0",
|
|
61
61
|
"react-helmet": "^6.0.0",
|
|
62
62
|
"react-icons": "^4.2.0",
|
|
63
63
|
"react-lazyload": "^2.6.5"
|
|
@@ -20,7 +20,13 @@ const Author = ({
|
|
|
20
20
|
<>
|
|
21
21
|
{link && icon && (
|
|
22
22
|
<div className={styles.authorIcon}>
|
|
23
|
-
<a
|
|
23
|
+
<a
|
|
24
|
+
href={link}
|
|
25
|
+
target="_blank"
|
|
26
|
+
rel="noreferrer"
|
|
27
|
+
aria-label={`${name} Link`}
|
|
28
|
+
className="author-gtm"
|
|
29
|
+
>
|
|
24
30
|
{icon}
|
|
25
31
|
</a>
|
|
26
32
|
</div>
|
|
@@ -35,7 +35,9 @@ export default function Item({
|
|
|
35
35
|
const isMobile = useIsMobile();
|
|
36
36
|
|
|
37
37
|
const ItemImage = () =>
|
|
38
|
-
item.image ?
|
|
38
|
+
item.image ? (
|
|
39
|
+
<img width="20" height="20" src={imagePrettyUrl(item.image)} alt={item.title} />
|
|
40
|
+
) : null;
|
|
39
41
|
|
|
40
42
|
return (
|
|
41
43
|
<ConditionalWrapper
|
|
@@ -53,6 +55,7 @@ export default function Item({
|
|
|
53
55
|
>
|
|
54
56
|
{item.value?.includes('http') || item.value?.includes('www') ? (
|
|
55
57
|
<a
|
|
58
|
+
aria-label={`${item?.title} link`}
|
|
56
59
|
href={item.value}
|
|
57
60
|
title={item.title}
|
|
58
61
|
rel={`noreferrer ${item.nofollow && 'nofollow'}`}
|
|
@@ -80,6 +83,7 @@ export default function Item({
|
|
|
80
83
|
to={item.value ? item.value : '#'}
|
|
81
84
|
title={item.title}
|
|
82
85
|
rel={item.nofollow && 'nofollow'}
|
|
86
|
+
aria-label={`${item?.title} link`}
|
|
83
87
|
>
|
|
84
88
|
<ItemImage />
|
|
85
89
|
{item.title}
|
|
@@ -87,6 +91,7 @@ export default function Item({
|
|
|
87
91
|
)}
|
|
88
92
|
{options.mobile.subMenuDropDownButton && isMobile && hasChildren && (
|
|
89
93
|
<button
|
|
94
|
+
aria-label={`${item?.title} Dropdown`}
|
|
90
95
|
type="button"
|
|
91
96
|
className={`${gtmClass} btn-cta`}
|
|
92
97
|
onClick={(e) => {
|
|
@@ -30,6 +30,7 @@ const OpenGraph = ({ page, text = 'Share: ' }) => {
|
|
|
30
30
|
role="button"
|
|
31
31
|
className={`${styles.btn} open-graph-gtm`}
|
|
32
32
|
onClick={(e) => share(e, 555, 602)}
|
|
33
|
+
aria-label="Facebook Link"
|
|
33
34
|
>
|
|
34
35
|
<FaFacebookF />
|
|
35
36
|
</a>
|
|
@@ -40,6 +41,7 @@ const OpenGraph = ({ page, text = 'Share: ' }) => {
|
|
|
40
41
|
role="button"
|
|
41
42
|
className={`${styles.btn} open-graph-gtm`}
|
|
42
43
|
onClick={(e) => share(e, 555, 255)}
|
|
44
|
+
aria-label="Twitter Link"
|
|
43
45
|
>
|
|
44
46
|
<FaTwitter />
|
|
45
47
|
</a>
|
|
@@ -18,39 +18,37 @@ const LinkList = ({
|
|
|
18
18
|
listIcon = <></>,
|
|
19
19
|
multiIcon = false,
|
|
20
20
|
classes,
|
|
21
|
-
|
|
21
|
+
disableLazyLoad = false,
|
|
22
22
|
height,
|
|
23
23
|
width,
|
|
24
24
|
gtmClass = '',
|
|
25
25
|
}) => {
|
|
26
26
|
function renderLinkContent(item, index) {
|
|
27
27
|
const icon = listIcon[index];
|
|
28
|
+
|
|
29
|
+
const LinkImage = () => {
|
|
30
|
+
return disableLazyLoad ? (
|
|
31
|
+
<img src={imagePrettyUrl(item.image)} width={width} height={height} alt={item.title} />
|
|
32
|
+
) : (
|
|
33
|
+
<LazyImage
|
|
34
|
+
src={imagePrettyUrl(item.image)}
|
|
35
|
+
alt={item.title}
|
|
36
|
+
width={width}
|
|
37
|
+
height={height}
|
|
38
|
+
/>
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
|
|
28
42
|
return (
|
|
29
43
|
<>
|
|
30
44
|
{!imageOnly && (
|
|
31
45
|
<>
|
|
32
46
|
{multiIcon ? icon : listIcon}
|
|
33
47
|
<span>{item.title}</span>
|
|
34
|
-
{item.image &&
|
|
35
|
-
<LazyImage
|
|
36
|
-
src={imagePrettyUrl(item.image)}
|
|
37
|
-
alt={item.title}
|
|
38
|
-
once={once}
|
|
39
|
-
width={width}
|
|
40
|
-
height={height}
|
|
41
|
-
/>
|
|
42
|
-
)}
|
|
48
|
+
{item.image && <LinkImage />}
|
|
43
49
|
</>
|
|
44
50
|
)}
|
|
45
|
-
{item.image && imageOnly &&
|
|
46
|
-
<LazyImage
|
|
47
|
-
src={imagePrettyUrl(item.image)}
|
|
48
|
-
alt={item.title}
|
|
49
|
-
once={once}
|
|
50
|
-
width={width}
|
|
51
|
-
height={height}
|
|
52
|
-
/>
|
|
53
|
-
)}
|
|
51
|
+
{item.image && imageOnly && <LinkImage />}
|
|
54
52
|
</>
|
|
55
53
|
);
|
|
56
54
|
}
|
|
@@ -66,6 +64,7 @@ const LinkList = ({
|
|
|
66
64
|
rel={`noreferrer ${item.nofollow && 'nofollow'}`}
|
|
67
65
|
target="_blank"
|
|
68
66
|
className={gtmClass}
|
|
67
|
+
aria-label={`${item.title} Link`}
|
|
69
68
|
>
|
|
70
69
|
{renderLinkContent(item, index)}
|
|
71
70
|
</a>
|
|
@@ -75,6 +74,7 @@ const LinkList = ({
|
|
|
75
74
|
title={item.title}
|
|
76
75
|
className={gtmClass}
|
|
77
76
|
rel={item.nofollow && 'nofollow'}
|
|
77
|
+
aria-label={`${item.title} Link`}
|
|
78
78
|
>
|
|
79
79
|
{renderLinkContent(item, index)}
|
|
80
80
|
</Link>
|
|
@@ -130,7 +130,7 @@ LinkList.propTypes = {
|
|
|
130
130
|
listIcon: PropTypes.oneOfType([PropTypes.element, PropTypes.any, PropTypes.node]),
|
|
131
131
|
multiIcon: PropTypes.bool,
|
|
132
132
|
classes: PropTypes.string,
|
|
133
|
-
|
|
133
|
+
disableLazyLoad: PropTypes.bool,
|
|
134
134
|
width: PropTypes.number,
|
|
135
135
|
height: PropTypes.number,
|
|
136
136
|
gtmClass: PropTypes.string,
|
|
@@ -34,6 +34,7 @@ const PaginationWithMidPoints = ({
|
|
|
34
34
|
<Link
|
|
35
35
|
to={getPagePath(1)}
|
|
36
36
|
className={`${styles.button} ${styles.isActive} pagination-gtm`}
|
|
37
|
+
aria-label="Go to First Page"
|
|
37
38
|
>
|
|
38
39
|
{firstComp}
|
|
39
40
|
</Link>
|
|
@@ -47,6 +48,7 @@ const PaginationWithMidPoints = ({
|
|
|
47
48
|
<Link
|
|
48
49
|
to={getPagePath(current - 1)}
|
|
49
50
|
className={`${styles.button} ${styles.isActive} pagination-gtm`}
|
|
51
|
+
aria-label="Previous Button"
|
|
50
52
|
>
|
|
51
53
|
{previousComp}
|
|
52
54
|
</Link>
|
|
@@ -128,6 +130,7 @@ const PaginationWithMidPoints = ({
|
|
|
128
130
|
<Link
|
|
129
131
|
to={getPagePath(current + 1)}
|
|
130
132
|
className={`${styles.button} ${styles.isActive} pagination-gtm`}
|
|
133
|
+
aria-label="Next Button"
|
|
131
134
|
>
|
|
132
135
|
{nextComp}
|
|
133
136
|
</Link>
|
|
@@ -141,6 +144,7 @@ const PaginationWithMidPoints = ({
|
|
|
141
144
|
<Link
|
|
142
145
|
to={getPagePath(total)}
|
|
143
146
|
className={`${styles.button} ${styles.isActive} pagination-gtm`}
|
|
147
|
+
aria-label="Go to Last"
|
|
144
148
|
>
|
|
145
149
|
{lastComp}
|
|
146
150
|
</Link>
|
|
@@ -31,6 +31,7 @@ const Row = ({ item, oneliner = 'main', layout = 'list' }) => {
|
|
|
31
31
|
className="casinos-top-list-gtm logo-cta"
|
|
32
32
|
target="_blank"
|
|
33
33
|
rel="noreferrer"
|
|
34
|
+
aria-label={`${item.name} Link`}
|
|
34
35
|
>
|
|
35
36
|
<LazyImage alt={item.name} src={imagePrettyUrl(item.logo_url, 100)} />
|
|
36
37
|
</a>
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
.contactForm
|
|
2
|
-
.newsLetterForm {
|
|
1
|
+
.contactForm {
|
|
3
2
|
width: 100%;
|
|
4
|
-
|
|
5
|
-
margin: 0 auto;
|
|
3
|
+
padding-top: 1.6rem;
|
|
6
4
|
form {
|
|
7
5
|
width: 100%;
|
|
8
6
|
@include flex-direction(column);
|
|
@@ -20,16 +18,17 @@
|
|
|
20
18
|
.formGroup {
|
|
21
19
|
width: 100%;
|
|
22
20
|
display: inline-block;
|
|
21
|
+
background-color: var(--color-48);
|
|
23
22
|
&.name {
|
|
24
|
-
width: calc(50% - 0.
|
|
25
|
-
margin-right:
|
|
23
|
+
width: calc(50% - 0.8rem);
|
|
24
|
+
margin-right: 1.6rem;
|
|
26
25
|
}
|
|
27
26
|
&.email {
|
|
28
|
-
width: calc(50% - 0.
|
|
27
|
+
width: calc(50% - 0.8rem);
|
|
29
28
|
}
|
|
30
29
|
&.message {
|
|
31
30
|
width: 100%;
|
|
32
|
-
margin-bottom:
|
|
31
|
+
margin-bottom: 1.6rem;
|
|
33
32
|
}
|
|
34
33
|
}
|
|
35
34
|
}
|
|
@@ -51,14 +50,14 @@
|
|
|
51
50
|
|
|
52
51
|
input,
|
|
53
52
|
textarea {
|
|
54
|
-
background:
|
|
55
|
-
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
53
|
+
background: var(--color-48);
|
|
56
54
|
border-radius: 0.3rem;
|
|
57
55
|
font-size: 1.4rem;
|
|
56
|
+
line-height: 2.1rem;
|
|
58
57
|
padding: 1.6rem;
|
|
59
58
|
width: 100%;
|
|
60
59
|
max-width: 100%;
|
|
61
|
-
|
|
60
|
+
border: none;
|
|
62
61
|
outline: none;
|
|
63
62
|
&:invalid,
|
|
64
63
|
&.invalid {
|
|
@@ -78,12 +77,16 @@
|
|
|
78
77
|
display: none;
|
|
79
78
|
}
|
|
80
79
|
}
|
|
80
|
+
|
|
81
81
|
.formButton {
|
|
82
|
+
display: inline-block;
|
|
82
83
|
width: 100%;
|
|
84
|
+
margin-bottom: .8rem;
|
|
83
85
|
button {
|
|
86
|
+
margin: 0;
|
|
84
87
|
width: 100%;
|
|
85
88
|
text-align: center;
|
|
86
|
-
height: 4.
|
|
89
|
+
height: 4.8rem;
|
|
87
90
|
&:focus {
|
|
88
91
|
border: none;
|
|
89
92
|
outline: none;
|
|
@@ -92,37 +95,36 @@
|
|
|
92
95
|
@include min(tablet) {
|
|
93
96
|
width: 100%;
|
|
94
97
|
button {
|
|
95
|
-
width:
|
|
98
|
+
min-width: 16.2rem;
|
|
96
99
|
}
|
|
97
100
|
}
|
|
98
|
-
@include min(
|
|
101
|
+
@include min(tablet) {
|
|
99
102
|
width: auto;
|
|
100
103
|
margin-right: 1.6rem;
|
|
101
104
|
display: inline-block;
|
|
102
105
|
}
|
|
103
106
|
}
|
|
104
107
|
.formAlerts {
|
|
105
|
-
|
|
108
|
+
display: inline-block;
|
|
106
109
|
order: -1;
|
|
107
110
|
@include min(tablet) {
|
|
111
|
+
width: calc(100% - 18rem);
|
|
108
112
|
order: unset;
|
|
109
113
|
}
|
|
110
114
|
@include min(desktop) {
|
|
111
|
-
width: calc(100% - 12rem);
|
|
112
115
|
display: inline-block;
|
|
113
|
-
float: right;
|
|
114
116
|
}
|
|
115
117
|
div {
|
|
116
118
|
border-radius: 0.4rem;
|
|
117
|
-
border: 1px solid
|
|
119
|
+
border: 1px solid var(--color-33);
|
|
118
120
|
font-size: 1.4rem;
|
|
119
121
|
font-weight: 400;
|
|
120
122
|
width: 100%;
|
|
121
123
|
height: 4.4rem;
|
|
122
124
|
padding: 1rem 1.6rem;
|
|
123
125
|
&.alertSuccess {
|
|
124
|
-
border-color: var(--
|
|
125
|
-
color: var(--
|
|
126
|
+
border-color: var(--color-44);
|
|
127
|
+
color: var(--color-44) ;
|
|
126
128
|
}
|
|
127
129
|
&.alertDanger {
|
|
128
130
|
border-color: var(--color-11);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
1
|
+
import React, { useState, useRef } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
|
|
3
|
+
import ReCAPTCHA from 'react-google-recaptcha';
|
|
4
4
|
import Button from '~atoms/button';
|
|
5
5
|
import styles from './form.module.scss';
|
|
6
6
|
|
|
@@ -13,11 +13,13 @@ const FormComponent = ({
|
|
|
13
13
|
hasButton = true,
|
|
14
14
|
buttonLabel = 'Submit',
|
|
15
15
|
}) => {
|
|
16
|
+
const recaptchaRef = useRef();
|
|
16
17
|
const [state, setState] = useState({
|
|
17
18
|
loading: false,
|
|
18
19
|
success: false,
|
|
19
20
|
failed: false,
|
|
20
21
|
isValid: true,
|
|
22
|
+
isDisabled: true,
|
|
21
23
|
name: '',
|
|
22
24
|
email: '',
|
|
23
25
|
message: '',
|
|
@@ -41,14 +43,19 @@ const FormComponent = ({
|
|
|
41
43
|
}
|
|
42
44
|
const handleSubmit = (e) => {
|
|
43
45
|
e.preventDefault();
|
|
44
|
-
const { name, email, message } = state;
|
|
45
|
-
if (
|
|
46
|
-
|
|
46
|
+
const { name, email, message, isDisabled } = state;
|
|
47
|
+
if (
|
|
48
|
+
name === '' ||
|
|
49
|
+
email === '' ||
|
|
50
|
+
(type === 'contact' && message === '') ||
|
|
51
|
+
isDisabled === true
|
|
52
|
+
) {
|
|
53
|
+
setState({ ...state, isValid: false, success: false });
|
|
47
54
|
return;
|
|
48
55
|
}
|
|
49
56
|
|
|
50
57
|
const form = e.target;
|
|
51
|
-
setState({ ...state, loading: true, success: false, failed: false });
|
|
58
|
+
setState({ ...state, loading: true, success: false, failed: false, isDisabled: true });
|
|
52
59
|
postData(submitUrl, new FormData(form))
|
|
53
60
|
.then((response) => {
|
|
54
61
|
// on success
|
|
@@ -58,6 +65,7 @@ const FormComponent = ({
|
|
|
58
65
|
success: true,
|
|
59
66
|
loading: false,
|
|
60
67
|
isValid: true,
|
|
68
|
+
isDisabled: true,
|
|
61
69
|
});
|
|
62
70
|
} else {
|
|
63
71
|
// on error
|
|
@@ -78,8 +86,14 @@ const FormComponent = ({
|
|
|
78
86
|
isValid: true,
|
|
79
87
|
});
|
|
80
88
|
});
|
|
89
|
+
recaptchaRef.current.reset();
|
|
81
90
|
};
|
|
82
91
|
|
|
92
|
+
function recaptchaOnChange(value) {
|
|
93
|
+
// eslint-disable-next-line no-unused-expressions
|
|
94
|
+
value && setState({ ...state, isDisabled: false });
|
|
95
|
+
}
|
|
96
|
+
|
|
83
97
|
return (
|
|
84
98
|
<div
|
|
85
99
|
className={`${styles.formComponent} ${
|
|
@@ -122,6 +136,13 @@ const FormComponent = ({
|
|
|
122
136
|
</div>
|
|
123
137
|
)}
|
|
124
138
|
{/* if has button */}
|
|
139
|
+
<div className={styles.recaptcha}>
|
|
140
|
+
<ReCAPTCHA
|
|
141
|
+
ref={recaptchaRef}
|
|
142
|
+
sitekey={`${process.env.RECAPTCHA_SITE_KEY}`}
|
|
143
|
+
onChange={recaptchaOnChange}
|
|
144
|
+
/>
|
|
145
|
+
</div>
|
|
125
146
|
{hasButton && (
|
|
126
147
|
<div className={styles.formButton}>
|
|
127
148
|
<Button
|
|
@@ -31,6 +31,12 @@ export function getRobotOptions(options) {
|
|
|
31
31
|
if (process.env.GATSBY_ACTIVE_ENV === 'development') array.push('noindex,follow');
|
|
32
32
|
return array.join();
|
|
33
33
|
}
|
|
34
|
+
|
|
35
|
+
function setName(string) {
|
|
36
|
+
const [name] = string.split('.');
|
|
37
|
+
return name[0].toUpperCase() + name.slice(1);
|
|
38
|
+
}
|
|
39
|
+
|
|
34
40
|
const Head = ({ page = {}, siteInfo }) => {
|
|
35
41
|
const pageImage = getPageImage(page) ? getPageImage(page) : imagePrettyUrl(siteInfo?.site_logo);
|
|
36
42
|
// When google re-indexes dev NSA and IRL, remove lines 28, 41, 42, 43 and process.env.GATSBY_ACTIVE_ENV !== 'development' from lines 24, 25, 27, 29, 43
|
|
@@ -43,7 +49,12 @@ const Head = ({ page = {}, siteInfo }) => {
|
|
|
43
49
|
{page.meta_robots && process.env.GATSBY_ACTIVE_ENV !== 'development' && (
|
|
44
50
|
<meta name="robots" content={page.meta_robots.join()} />
|
|
45
51
|
)}
|
|
46
|
-
|
|
52
|
+
|
|
53
|
+
{page.robot_options && !page.path.includes('/page/') && (
|
|
54
|
+
<meta name="robots" content={getRobotOptions(page.robot_options)} />
|
|
55
|
+
)}
|
|
56
|
+
{page.path.includes('/page/') && <meta name="robots" content="noindex,follow" />}
|
|
57
|
+
|
|
47
58
|
{process.env.GATSBY_ACTIVE_ENV === 'development' && (
|
|
48
59
|
<meta name="googlebot" content="noindex,follow" />
|
|
49
60
|
)}
|
|
@@ -51,11 +62,12 @@ const Head = ({ page = {}, siteInfo }) => {
|
|
|
51
62
|
{page.preconnect_links &&
|
|
52
63
|
page.preconnect_links.map((link) => <link key={keygen()} rel="preconnect" href={link} />)}
|
|
53
64
|
<meta name="og:title" content={page.meta_title} />
|
|
54
|
-
<meta name="og:site_name" content={siteInfo?.site_name} />
|
|
65
|
+
<meta name="og:site_name" content={siteInfo?.site_name && setName(siteInfo?.site_name)} />
|
|
55
66
|
<meta name="og:description" content={page.meta_description} />
|
|
56
|
-
<meta name="og:type" content=
|
|
67
|
+
<meta name="og:type" content={page.path === '/' ? 'website' : 'article'} />
|
|
57
68
|
<meta name="og:image" content={pageImage} />
|
|
58
69
|
<meta name="og:url" content={getUrl(page.path)} />
|
|
70
|
+
|
|
59
71
|
{schemaGenerator(page, pageImage).map(
|
|
60
72
|
(schema) =>
|
|
61
73
|
schema && (
|
|
@@ -62,7 +62,12 @@ const Navigation = ({
|
|
|
62
62
|
>
|
|
63
63
|
<nav className={styles.nav} style={{ justifyContent: logoPosition }} ref={navRef}>
|
|
64
64
|
<NavigationProvider>
|
|
65
|
-
<Link
|
|
65
|
+
<Link
|
|
66
|
+
className={`${styles.logo} main-menu-gtm logo-cta`}
|
|
67
|
+
aria-label="Nav Logo"
|
|
68
|
+
to="/"
|
|
69
|
+
onClick={onClickHandler}
|
|
70
|
+
>
|
|
66
71
|
<img alt="logo" src={logo} width={logoWidth} height={logoHeight} />
|
|
67
72
|
</Link>
|
|
68
73
|
{showMenu && (
|
|
@@ -28,7 +28,10 @@ const Tracker = ({
|
|
|
28
28
|
for (let i = 0; i < trackerLinks.length; i += 1) {
|
|
29
29
|
const trackerLink = trackerLinks[i].toLowerCase().replace(' ', '_');
|
|
30
30
|
if (path.includes(trackerLink)) {
|
|
31
|
-
tracker =
|
|
31
|
+
tracker =
|
|
32
|
+
operator.links[
|
|
33
|
+
Object.keys(operator.links).find((key) => key.toLowerCase() === trackerLink.toLowerCase())
|
|
34
|
+
];
|
|
32
35
|
break;
|
|
33
36
|
}
|
|
34
37
|
if (path.includes('ppc_fallback')) {
|
package/src/hooks/tabs/index.js
CHANGED
|
@@ -10,12 +10,12 @@ describe('404', () => {
|
|
|
10
10
|
const { container } = render(
|
|
11
11
|
<PageNotFound
|
|
12
12
|
pageContext={{
|
|
13
|
-
page: { sections: {} },
|
|
13
|
+
page: { sections: {}, path: '' },
|
|
14
14
|
marketSections: {},
|
|
15
15
|
siteInfo: {
|
|
16
16
|
site_name: '',
|
|
17
|
-
site_logo: ''
|
|
18
|
-
}
|
|
17
|
+
site_logo: '',
|
|
18
|
+
},
|
|
19
19
|
}}
|
|
20
20
|
/>
|
|
21
21
|
);
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// eslint-disable-next-line import/prefer-default-export
|
|
2
|
+
export const authors = {
|
|
3
|
+
1: {
|
|
4
|
+
author_title: 'Irish Sportsbook Specialist',
|
|
5
|
+
email_address: 'siobhan.aslett@irishluck.ie',
|
|
6
|
+
facebook_profile: null,
|
|
7
|
+
image: 'siobhan-aslett.png',
|
|
8
|
+
image_alt: 'Siobhan Aslett',
|
|
9
|
+
image_object: {
|
|
10
|
+
width: '1024',
|
|
11
|
+
height: '1024',
|
|
12
|
+
url: 'https://assets-srv.s3.eu-west-1.amazonaws.com/siobhan-aslett.png',
|
|
13
|
+
filename: 'siobhan-aslett.png',
|
|
14
|
+
},
|
|
15
|
+
instagram_profile: null,
|
|
16
|
+
linkedin_profile: 'https://ie.linkedin.com/in/siobhan-aslett-b748091ab',
|
|
17
|
+
name: 'Siobhan Aslett',
|
|
18
|
+
twitter_profile: null,
|
|
19
|
+
},
|
|
20
|
+
2: {
|
|
21
|
+
author_title: 'Online Casino Specialist',
|
|
22
|
+
email_address: 'dermot.heathcote@irishluck.ie',
|
|
23
|
+
facebook_profile: null,
|
|
24
|
+
image: 'dermot-heathcote.png',
|
|
25
|
+
image_alt: null,
|
|
26
|
+
instagram_profile: null,
|
|
27
|
+
linkedin_profile: null,
|
|
28
|
+
image_object: {
|
|
29
|
+
width: '1024',
|
|
30
|
+
height: '1024',
|
|
31
|
+
url: 'https://assets-srv.s3.eu-west-1.amazonaws.com/dermot-heathcote.png',
|
|
32
|
+
filename: 'dermot-heathcote.png',
|
|
33
|
+
},
|
|
34
|
+
name: 'Dermot Heathcote',
|
|
35
|
+
twitter_profile: null,
|
|
36
|
+
},
|
|
37
|
+
3: {
|
|
38
|
+
additional_url: null,
|
|
39
|
+
author_title: 'Junior Copywriter',
|
|
40
|
+
email_address: 'cameron.murphy@irishluck.ie',
|
|
41
|
+
facebook_profile: null,
|
|
42
|
+
image: 'cameron-murphy.jpeg',
|
|
43
|
+
image_alt: null,
|
|
44
|
+
image_asset_id: 37728,
|
|
45
|
+
image_object: {
|
|
46
|
+
width: '1024',
|
|
47
|
+
height: '1024',
|
|
48
|
+
url: 'https://assets-srv.s3.eu-west-1.amazonaws.com/cameron-murphy.jpeg',
|
|
49
|
+
filename: 'cameron-murphy.jpeg',
|
|
50
|
+
},
|
|
51
|
+
instagram_profile: null,
|
|
52
|
+
linkedin_profile: null,
|
|
53
|
+
name: 'Cameron Murphy',
|
|
54
|
+
personal_website: null,
|
|
55
|
+
profile_page_path: 'about-us/cameron-murphy',
|
|
56
|
+
site_id: 1,
|
|
57
|
+
twitter_profile: null,
|
|
58
|
+
},
|
|
59
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// eslint-disable-next-line import/prefer-default-export
|
|
2
|
+
export const siteSchema = {
|
|
3
|
+
address: null,
|
|
4
|
+
alias_site_name: null,
|
|
5
|
+
email: null,
|
|
6
|
+
facebook: 'https://www.facebook.com/',
|
|
7
|
+
instagram: 'https://www.instagram.com/',
|
|
8
|
+
linkedin: 'https://www.linkedin.com/',
|
|
9
|
+
organization_founding_date: null,
|
|
10
|
+
owned_by: null,
|
|
11
|
+
phone_number: null,
|
|
12
|
+
site_name: null,
|
|
13
|
+
spotify: 'https://www.spotify.com/',
|
|
14
|
+
twitter: 'https://www.twitter.com/',
|
|
15
|
+
wikipedia: 'https://www.wikipedia.com/',
|
|
16
|
+
youtube: 'https://www.youtube.com/',
|
|
17
|
+
};
|