gatsby-core-theme 1.6.5 → 1.6.9

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 CHANGED
@@ -1,3 +1,56 @@
1
+ ## [1.6.9](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v1.6.8...v1.6.9) (2021-11-24)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * scroll-to-top fix ([8f7264c](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/8f7264cac3d4c0b11daaf1ddf5f08539e1bc5473))
7
+
8
+
9
+ * Merge branch 'master' of git.ilcd.rocks:team-floyd/themes/gatsby-themes ([3d4fc0d](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/3d4fc0d86f199761b32785f0ced0ae1c8c3c5ebb))
10
+
11
+ ## [1.6.8](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v1.6.7...v1.6.8) (2021-11-24)
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * non main trackers ([adb1c71](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/adb1c71f34e7bc552696b358ea1cbbccf7b3d2e3))
17
+
18
+ ## [1.6.7](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v1.6.6...v1.6.7) (2021-11-24)
19
+
20
+
21
+ ### Bug Fixes
22
+
23
+ * added translations to the archive page and fixes for link list ([69ebe2e](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/69ebe2ef1fea637a093436ab015aa26058f9fde1))
24
+ * fix some more links without accessible name ([2e8f905](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/2e8f9053369a69c67935e45490f3c5cafdebd4c1))
25
+ * fixes on accesibility ([6689ff1](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/6689ff182b750ef70143bdce779889805d88be02))
26
+ * tab change lazyload issue ([a1c30c2](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/a1c30c2a98a23048f653cd0d56f9a17d0e7affbd))
27
+
28
+
29
+ ### Code Refactoring
30
+
31
+ * fixes on accessbility ([de7482a](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/de7482ae746bc60e8939ed6031a6b883f61e2954))
32
+
33
+
34
+ ### Config
35
+
36
+ * changing sitename for testing purposes ([391c01c](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/391c01c7668771feacb551c4ae4e022c7c90db93))
37
+
38
+
39
+ * Merge branch 'tm-2605-translations-in-archive' into 'master' ([9be0770](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/9be07704de3e011af549f76ff67e570264766dc0))
40
+ * Merge branch 'tm-2595-accessibility-scores' into 'master' ([c63653f](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/c63653f1bdac5e6abfa5a49d9029b7de8cd23e33))
41
+ * Merge branch 'tm-2478-search' into 'master' ([a4fbd15](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/a4fbd1528bcf9cde03dc2097e9b79c618a0f544a))
42
+
43
+ ## [1.6.6](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v1.6.5...v1.6.6) (2021-11-23)
44
+
45
+
46
+ ### Bug Fixes
47
+
48
+ * added captcha on form ([a85dcb1](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/a85dcb1b6aa405cab07b4e2d235e63bb189f9511))
49
+ * general fixes ([80bab76](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/80bab7614074a770f0d97a3c3499086701fe7bda))
50
+
51
+
52
+ * Merge branch 'tm-2565-contact-us-page' into 'master' ([0563d78](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/0563d781911004f3fb370e96fcca76066405cd60))
53
+
1
54
  ## [1.6.5](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v1.6.4...v1.6.5) (2021-11-22)
2
55
 
3
56
 
@@ -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.5",
3
+ "version": "1.6.9",
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.1",
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 href={link} target="_blank" rel="noreferrer" className="author-gtm">
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>
@@ -73,6 +73,7 @@ export default function AuthorBox({ author }) {
73
73
  target="_blank"
74
74
  rel="noreferrer"
75
75
  key={`author-box-link-${filteredLinks.id}`}
76
+ aria-label={`${filteredLinks.id} Link`}
76
77
  >
77
78
  {filteredLinks.icon}
78
79
  </a>
@@ -16,6 +16,7 @@ const Logo = ({ item = {} }) => {
16
16
  title={item.name}
17
17
  target="_blank"
18
18
  rel="noopener noreferrer"
19
+ aria-label={`${item.name} Link`}
19
20
  >
20
21
  <LazyImage alt={item.name} src={imagePrettyUrl(item.logo_url)} />
21
22
  </a>
@@ -55,6 +55,7 @@ export default function Item({
55
55
  >
56
56
  {item.value?.includes('http') || item.value?.includes('www') ? (
57
57
  <a
58
+ aria-label={`${item?.title} link`}
58
59
  href={item.value}
59
60
  title={item.title}
60
61
  rel={`noreferrer ${item.nofollow && 'nofollow'}`}
@@ -82,6 +83,7 @@ export default function Item({
82
83
  to={item.value ? item.value : '#'}
83
84
  title={item.title}
84
85
  rel={item.nofollow && 'nofollow'}
86
+ aria-label={`${item?.title} link`}
85
87
  >
86
88
  <ItemImage />
87
89
  {item.title}
@@ -89,6 +91,7 @@ export default function Item({
89
91
  )}
90
92
  {options.mobile.subMenuDropDownButton && isMobile && hasChildren && (
91
93
  <button
94
+ aria-label={`${item?.title} Dropdown`}
92
95
  type="button"
93
96
  className={`${gtmClass} btn-cta`}
94
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>
@@ -1,25 +1,42 @@
1
- import React from 'react';
1
+ import React, { useState, useEffect } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
 
4
- import { registerScroll } from '~helpers/scroll';
5
4
  import styles from './scroll-to-top.module.scss';
6
5
 
7
6
  const ScrollToTop = ({ scrollTo = '0' }) => {
8
- registerScroll();
9
-
10
- function scrollToTop(e) {
11
- e.preventDefault();
12
- window.scrollTo({
13
- top: scrollTo,
14
- behavior: 'smooth',
15
- });
16
- }
7
+ const [showScroll, setShowScroll] = useState(false);
8
+
9
+ const checkScrollTop = () => {
10
+ if (!showScroll && window.pageYOffset > 400) {
11
+ setShowScroll(true);
12
+ } else if (showScroll && window.pageYOffset <= 400) {
13
+ setShowScroll(false);
14
+ }
15
+ };
16
+
17
+ const scrollTop = () => {
18
+ window.scrollTo({ top: scrollTo, behavior: 'smooth' });
19
+ };
20
+
21
+ useEffect(() => {
22
+ if (typeof window !== 'undefined') {
23
+ window.addEventListener('scroll', checkScrollTop);
24
+
25
+ return () => {
26
+ window.removeEventListener('scroll', checkScrollTop);
27
+ };
28
+ }
29
+
30
+ return null;
31
+ });
32
+
17
33
  return (
18
34
  <button
19
35
  type="button"
20
36
  aria-label="Scroll to top"
21
- onClick={(e) => scrollToTop(e)}
37
+ onClick={(e) => scrollTop(e)}
22
38
  className={styles.scrollToTop}
39
+ style={{ display: showScroll ? 'flex' : 'none' }}
23
40
  />
24
41
  );
25
42
  };
@@ -1,3 +1,9 @@
1
+ body[data-scroll='0'] {
2
+ .scrollToTop {
3
+ opacity: 0;
4
+ }
5
+ }
6
+
1
7
  .scrollToTop {
2
8
  z-index: map-get($z-index, scroll-to-top);
3
9
  border-radius: 50%;
@@ -6,9 +12,12 @@
6
12
  width: 64px;
7
13
  height: 64px;
8
14
  text-align: center;
9
-
15
+ bottom: 0;
16
+ position: fixed;
17
+ right: 0;
18
+
10
19
  &:before {
11
- @include arrow(#fff, 2rem, up, false);
20
+ @include arrow(#000, 2rem, up, false);
12
21
  position: absolute;
13
22
  bottom: calc(50% - 1.25rem);
14
23
  left: calc(50% - 1rem);
@@ -18,39 +18,37 @@ const LinkList = ({
18
18
  listIcon = <></>,
19
19
  multiIcon = false,
20
20
  classes,
21
- once = false,
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
- once: PropTypes.bool,
133
+ disableLazyLoad: PropTypes.bool,
134
134
  width: PropTypes.number,
135
135
  height: PropTypes.number,
136
136
  gtmClass: PropTypes.string,
@@ -70,8 +70,8 @@ export default {
70
70
  type: null,
71
71
  },
72
72
  },
73
- once: {
74
- name: 'once',
73
+ disableLazyLoad: {
74
+ name: 'disableLazyLoad',
75
75
  type: { name: 'boolean', required: false },
76
76
  defaultValue: '',
77
77
  description:
@@ -47,6 +47,7 @@ export default function OperatorBanner({
47
47
  title={operator?.name}
48
48
  target="_blank"
49
49
  rel="noreferrer"
50
+ aria-label={`${operator?.name} Link`}
50
51
  >
51
52
  <LazyImage alt={operator?.name} src={imagePrettyUrl(logo)} />
52
53
  </a>
@@ -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
- max-width: 80rem;
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.4rem);
25
- margin-right: 0.8rem;
23
+ width: calc(50% - 0.8rem);
24
+ margin-right: 1.6rem;
26
25
  }
27
26
  &.email {
28
- width: calc(50% - 0.4rem);
27
+ width: calc(50% - 0.8rem);
29
28
  }
30
29
  &.message {
31
30
  width: 100%;
32
- margin-bottom: 1rem;
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: #f3f2f2;
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
- // border: none;
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.4rem;
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: auto;
98
+ min-width: 16.2rem;
96
99
  }
97
100
  }
98
- @include min(desktop) {
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
- width: 100%;
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 #000;
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(--primary-color);
125
- color: var(--primary-color);
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 (name === '' || email === '' || (type === 'contact' && message === '')) {
46
- setState({ ...state, isValid: false });
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
- {page.robot_options && <meta name="robots" content={getRobotOptions(page.robot_options)} />}
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="article" />
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 className={`${styles.logo} main-menu-gtm logo-cta`} to="/" onClick={onClickHandler}>
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 = operator.links[trackerLink];
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')) {
@@ -25,7 +25,7 @@ const Tabs = ({
25
25
 
26
26
  function onClickTabItem(tabId) {
27
27
  setActiveTab(tabId);
28
- forceCheck();
28
+ setTimeout(forceCheck);
29
29
  }
30
30
 
31
31
  return (
@@ -79,7 +79,7 @@ TabList.propTypes = {
79
79
  activeTab: PropTypes.string,
80
80
  activeTabClass: PropTypes.string,
81
81
  alignRight: PropTypes.bool,
82
- gtmClass: PropTypes.bool,
82
+ gtmClass: PropTypes.string,
83
83
  };
84
84
 
85
85
  export default TabList;
@@ -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
  );
@@ -49,4 +49,5 @@
49
49
  --color-45: #83ad10;
50
50
  --color-46: #cc8006;
51
51
  --color-47: #006695;
52
+ --color-48: #E5E5E5;
52
53
  }
@@ -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
+ };