gatsby-matrix-theme 2.0.5 → 2.2.0

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.
Files changed (96) hide show
  1. package/.storybook/main.js +1 -0
  2. package/CHANGELOG.md +102 -0
  3. package/jest.config.js +1 -0
  4. package/package.json +2 -2
  5. package/src/components/atoms/cards/article-card/index.js +9 -6
  6. package/src/components/atoms/cards/author-card/index.js +6 -1
  7. package/src/components/atoms/cards/base-card/index.js +1 -1
  8. package/src/components/atoms/cards/game-card/index.js +9 -6
  9. package/src/components/atoms/cards/operator-card/index.js +14 -8
  10. package/src/components/atoms/cards/payment-method-card/index.js +11 -9
  11. package/src/components/atoms/cards/popup-card/index.js +5 -5
  12. package/src/components/atoms/cards/popup-card/popup-card.module.scss +6 -7
  13. package/src/components/atoms/cards/popup-card/popup-card.stories.js +0 -10
  14. package/src/components/atoms/cards/software-provider-card/index.js +10 -9
  15. package/src/components/atoms/link-menu/index.js +1 -1
  16. package/src/components/atoms/modal/modal.module.scss +44 -41
  17. package/src/components/atoms/newsletter/success/index.js +18 -13
  18. package/src/components/atoms/operator-bonuses/index.js +10 -7
  19. package/src/components/atoms/search/autocomplete/article.js +1 -1
  20. package/src/components/atoms/search/autocomplete/game.js +1 -1
  21. package/src/components/atoms/search/autocomplete/operator.js +1 -1
  22. package/src/components/atoms/search/autocomplete/payment_methods.js +1 -1
  23. package/src/components/atoms/search/autocomplete/software_provider.js +1 -1
  24. package/src/components/atoms/table/banking/index.js +24 -20
  25. package/src/components/atoms/table/column/index.js +2 -5
  26. package/src/components/atoms/table/staticColumn/index.js +28 -33
  27. package/src/components/molecules/faq/faq.module.scss +14 -10
  28. package/src/components/molecules/faq/index.js +1 -1
  29. package/src/components/molecules/game-iframe/index.js +6 -1
  30. package/src/components/molecules/game-score-gauge/game-score-gauge.stories.js +7 -12
  31. package/src/components/molecules/game-score-gauge/index.js +4 -2
  32. package/src/components/molecules/info-grid/index.js +1 -0
  33. package/src/components/molecules/newsletter/index.js +1 -0
  34. package/src/components/molecules/newsletter/newsletter.stories.js +106 -112
  35. package/src/components/molecules/newsletter-optin/index.js +7 -7
  36. package/src/components/molecules/newsletter-optin/newsletter-optin.stories.js +79 -80
  37. package/src/components/molecules/operator-summary/index.js +8 -2
  38. package/src/components/molecules/small-welcome-bonus/index.js +19 -6
  39. package/src/components/molecules/small-welcome-bonus/small-welcome-bonus.stories.js +49 -53
  40. package/src/components/molecules/toplist/row/variant-one.js +26 -10
  41. package/src/components/organisms/footer-navigation/index.js +9 -1
  42. package/src/components/organisms/popup/index.js +9 -6
  43. package/src/components/organisms/popup/popup.stories.js +0 -10
  44. package/src/components/organisms/toplist/comparison-table/index.js +11 -13
  45. package/src/components/organisms/toplist/index.js +2 -4
  46. package/src/components/organisms/toplist/list/index.js +11 -7
  47. package/src/components/organisms/toplist/list/list.module.scss +7 -0
  48. package/src/gatsby-core-theme/components/atoms/bonus/bonus.module.scss +15 -0
  49. package/src/gatsby-core-theme/components/atoms/bonus/index.js +4 -3
  50. package/src/gatsby-core-theme/components/atoms/module-title/index.js +7 -9
  51. package/src/gatsby-core-theme/components/atoms/not-found/index.js +24 -0
  52. package/src/gatsby-core-theme/components/atoms/not-found/not-found.module.scss +17 -0
  53. package/src/gatsby-core-theme/components/atoms/spotlights/index.js +25 -8
  54. package/src/gatsby-core-theme/components/molecules/content/content.module.scss +73 -16
  55. package/src/gatsby-core-theme/components/molecules/content/index.js +2 -0
  56. package/src/gatsby-core-theme/components/molecules/footer/index.js +5 -1
  57. package/src/gatsby-core-theme/components/molecules/main/index.js +6 -1
  58. package/src/gatsby-core-theme/components/molecules/module/index.js +1 -3
  59. package/src/gatsby-core-theme/components/molecules/search/index.js +28 -4
  60. package/src/gatsby-core-theme/components/organisms/anchor/anchor.module.scss +5 -1
  61. package/src/gatsby-core-theme/components/organisms/anchor/index.js +11 -2
  62. package/src/gatsby-core-theme/components/organisms/carousel/index.js +17 -6
  63. package/src/gatsby-core-theme/components/organisms/navigation/index.js +2 -2
  64. package/src/gatsby-core-theme/components/organisms/search/index.js +2 -1
  65. package/src/gatsby-core-theme/components/pages/body/index.js +14 -9
  66. package/src/gatsby-core-theme/components/pages/search/index.js +79 -74
  67. package/src/hooks/tabs/index.js +6 -4
  68. package/src/hooks/tabs/tab/tab-list.js +4 -1
  69. package/src/hooks/tabs/tab/tab.js +37 -28
  70. package/storybook/public/{0.50c23d5b.iframe.bundle.js → 0.a5c4cf9f.iframe.bundle.js} +1 -1
  71. package/storybook/public/{1.eef04bc1.iframe.bundle.js → 1.b2b72c50.iframe.bundle.js} +1 -1
  72. package/storybook/public/{10.454cae2f.iframe.bundle.js → 10.502b5ac2.iframe.bundle.js} +1 -1
  73. package/storybook/public/{11.6ec11208.iframe.bundle.js → 11.30535586.iframe.bundle.js} +1 -1
  74. package/storybook/public/{5.5635a723.iframe.bundle.js → 5.66b5b921.iframe.bundle.js} +3 -3
  75. package/storybook/public/{5.5635a723.iframe.bundle.js.LICENSE.txt → 5.66b5b921.iframe.bundle.js.LICENSE.txt} +0 -0
  76. package/storybook/public/5.66b5b921.iframe.bundle.js.map +1 -0
  77. package/storybook/public/{6.a0f625e4.iframe.bundle.js → 6.89431426.iframe.bundle.js} +1 -1
  78. package/storybook/public/{7.4b9a5033.iframe.bundle.js → 7.a53e817b.iframe.bundle.js} +1 -1
  79. package/storybook/public/8.e043e6dc.iframe.bundle.js +3 -0
  80. package/storybook/public/{8.4148b63e.iframe.bundle.js.LICENSE.txt → 8.e043e6dc.iframe.bundle.js.LICENSE.txt} +0 -0
  81. package/storybook/public/8.e043e6dc.iframe.bundle.js.map +1 -0
  82. package/storybook/public/{9.08fee7fe.iframe.bundle.js → 9.eba0e7c0.iframe.bundle.js} +1 -1
  83. package/storybook/public/iframe.html +1 -1
  84. package/storybook/public/main.c07025f4.iframe.bundle.js +1 -0
  85. package/storybook/public/{runtime~main.d64660ee.iframe.bundle.js → runtime~main.c4f3a4d6.iframe.bundle.js} +1 -1
  86. package/storybook/public/vendors~main.8050786b.iframe.bundle.js +7 -0
  87. package/storybook/public/{vendors~main.aac219e4.iframe.bundle.js.LICENSE.txt → vendors~main.8050786b.iframe.bundle.js.LICENSE.txt} +0 -0
  88. package/storybook/public/vendors~main.8050786b.iframe.bundle.js.map +1 -0
  89. package/src/components/atoms/newsletter/success/success.module.scss +0 -28
  90. package/src/gatsby-core-theme/pages/404/index.js +0 -66
  91. package/storybook/public/5.5635a723.iframe.bundle.js.map +0 -1
  92. package/storybook/public/8.4148b63e.iframe.bundle.js +0 -3
  93. package/storybook/public/8.4148b63e.iframe.bundle.js.map +0 -1
  94. package/storybook/public/main.e82d53bf.iframe.bundle.js +0 -1
  95. package/storybook/public/vendors~main.aac219e4.iframe.bundle.js +0 -7
  96. package/storybook/public/vendors~main.aac219e4.iframe.bundle.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { useContext } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { MdCheck } from 'react-icons/md';
4
4
  import {
@@ -15,6 +15,7 @@ import SellingPoints from 'gatsby-core-theme/src/components/atoms/selling-points
15
15
  import OperatorCta from 'gatsby-core-theme/src/components/atoms/operator-cta';
16
16
  import Tnc from 'gatsby-core-theme/src/components/molecules/tnc';
17
17
  import Bonus from 'gatsby-core-theme/src/components/atoms/bonus';
18
+ import { Context } from 'gatsby-core-theme/src/context/TranslationsProvider';
18
19
  import styles from './variant-one.module.scss';
19
20
 
20
21
  export default function Row({
@@ -24,13 +25,13 @@ export default function Row({
24
25
  layout = 'list',
25
26
  number = 1,
26
27
  isPPC = false,
27
- translations = {},
28
28
  }) {
29
29
  const itemName = item.name;
30
30
  const itemRating = item.rating;
31
31
  const reviewPath = item.review_link ? `/${item.review_link}` : item.path || '/';
32
32
  const logoUrl = item.logo_url;
33
33
  const pros = item.extra_fields?.pro_1 || item.extra_fields?.pro_2 || item.extra_fields?.pro_3;
34
+ const { translations } = useContext(Context) || {};
34
35
  let sellingPoints = item.selling_points;
35
36
  if (pros) {
36
37
  sellingPoints = [
@@ -51,7 +52,7 @@ export default function Row({
51
52
  )}
52
53
  <div className={styles.ribbon}>
53
54
  {getExtraField(item.extra_fields, 'ribbon_text') && (
54
- <Link to={reviewPath}>
55
+ <Link to={reviewPath} className="toplist-variant-one-gtm">
55
56
  <Label
56
57
  title={getExtraField(item.extra_fields, 'ribbon_text')}
57
58
  bgColor={getExtraField(item.extra_fields, 'ribbon_color')}
@@ -61,7 +62,13 @@ export default function Row({
61
62
  </div>
62
63
 
63
64
  <div className={styles.casinoDetails}>
64
- <a href={prettyLink} aria-label={itemName} target="_blank" rel="noreferrer">
65
+ <a
66
+ href={prettyLink}
67
+ aria-label={itemName}
68
+ target="_blank"
69
+ rel="noreferrer"
70
+ className="toplist-variant-one-gtm logo-cta"
71
+ >
65
72
  <LazyImage
66
73
  alt={itemName}
67
74
  width={128}
@@ -70,18 +77,28 @@ export default function Row({
70
77
  />
71
78
  </a>
72
79
  <div>
73
- <a href={prettyLink} target="_blank" rel="noreferrer">
80
+ <a
81
+ href={prettyLink}
82
+ target="_blank"
83
+ rel="noreferrer"
84
+ className="toplist-variant-one-gtm name-cta"
85
+ >
74
86
  {itemName}
75
87
  </a>
76
88
  <StarRating numOfStars={5} rating={itemRating} />
77
89
  </div>
78
90
  </div>
79
91
  <div className={styles.bonus}>
80
- <a href={prettyLink} target="_blank" rel="noreferrer">
92
+ <a
93
+ href={prettyLink}
94
+ target="_blank"
95
+ rel="noreferrer"
96
+ className="toplist-variant-one-gtm bonus-cta"
97
+ >
81
98
  <Bonus item={item} tracker={oneliner} />
82
99
  </a>
83
100
  {!isPPC && (
84
- <Link className={styles.reviewLink} to={reviewPath}>
101
+ <Link className={`${styles.reviewLink} toplist-variant-one-gtm`} to={reviewPath}>
85
102
  {`${itemName} ${translate(translations, 'read_review', 'Review')}`}
86
103
  </Link>
87
104
  )}
@@ -90,9 +107,9 @@ export default function Row({
90
107
  <SellingPoints icon={<MdCheck />} sellingPoints={sellingPoints} limit={3} />
91
108
  </div>
92
109
  <div className={styles.cta}>
93
- <OperatorCta operator={item} tracker={tracker} />
110
+ <OperatorCta operator={item} tracker={tracker} gtmClass="toplist-operator-cta-gtm" />
94
111
  {!isPPC && (
95
- <Link className={styles.reviewLink} to={reviewPath}>
112
+ <Link className={`${styles.reviewLink} toplist-variant-one-gtm`} to={reviewPath}>
96
113
  {`${itemName} ${translate(translations, 'read_review', 'Review')}`}
97
114
  </Link>
98
115
  )}
@@ -140,5 +157,4 @@ Row.propTypes = {
140
157
  }).isRequired,
141
158
  number: PropTypes.number,
142
159
  isPPC: PropTypes.bool,
143
- translations: PropTypes.shape({}),
144
160
  };
@@ -9,7 +9,15 @@ const FooterNavigation = ({ section, isStorybook = false }) => {
9
9
  const menuArray = getFirstModuleByName(section, 'menu');
10
10
  return (
11
11
  <div className={`${styles.footerLinks} ${isStorybook && styles.storybookStyles}`}>
12
- <LinkList showListTitle={false} singleList lists={menuArray} once width={48} height={48} />
12
+ <LinkList
13
+ showListTitle={false}
14
+ singleList
15
+ lists={menuArray}
16
+ once
17
+ width={48}
18
+ height={48}
19
+ gtmClass="mobile-menu-gtm"
20
+ />
13
21
  </div>
14
22
  );
15
23
  };
@@ -4,22 +4,26 @@
4
4
  /* eslint-disable jsx-a11y/no-static-element-interactions */
5
5
  /* eslint-disable jsx-a11y/click-events-have-key-events */
6
6
  /* eslint-disable react/no-danger */
7
- import React, { useRef, useEffect, useState } from 'react';
7
+ import React, { useRef, useEffect, useState, useContext } from 'react';
8
8
  import PropTypes from 'prop-types';
9
9
  import { MdClose } from 'react-icons/md';
10
10
  import { translate } from 'gatsby-core-theme/src/helpers/getters';
11
+ import { Context } from 'gatsby-core-theme/src/context/TranslationsProvider';
12
+ import PopupCard from '../../atoms/cards/popup-card';
11
13
 
12
14
  import { setIdleTimeout } from '../../../helpers/popup';
13
- import PopupCard from '../../atoms/cards/popup-card';
15
+ import { isMobileDevice } from '../../../helpers/mobile-detect';
14
16
 
15
17
  import styles from './popup.module.scss';
16
18
 
17
- const Popup = ({ module, translations, isStorybook = false }) => {
19
+ const Popup = ({ module, isStorybook = false }) => {
18
20
  const modal = useRef(null);
19
21
  const [showModal, setShowModal] = useState(false);
20
22
  const { items } = module.items[0];
21
23
  const shownItems = items?.slice(0, 4) || [];
22
24
  const { style } = module;
25
+ const tracker = isMobileDevice() ? 'mobPopup' : 'Popup';
26
+ const { translations } = useContext(Context) || {};
23
27
 
24
28
  const close = () => {
25
29
  setShowModal(false);
@@ -91,12 +95,12 @@ const Popup = ({ module, translations, isStorybook = false }) => {
91
95
  <div className={styles.modalContent}>
92
96
  <div className={styles.modalTitle}>
93
97
  <p>{translate(translations, 'claim_bonuses', 'Claim These Exclusive Bonuses')}</p>
94
- <button className={styles.closeIcon} onClick={close}>
98
+ <button className={`${styles.closeIcon} popup-gtm btn-cta`} onClick={close}>
95
99
  <MdClose />
96
100
  </button>
97
101
  </div>
98
102
  {shownItems?.map((item) => (
99
- <PopupCard item={item} translations={translations} />
103
+ <PopupCard item={item} tracker={tracker} />
100
104
  ))}
101
105
  </div>
102
106
  </div>
@@ -110,7 +114,6 @@ Popup.propTypes = {
110
114
  items: PropTypes.arrayOf({}),
111
115
  style: PropTypes.string,
112
116
  }).isRequired,
113
- translations: PropTypes.shape({}),
114
117
  isStorybook: PropTypes.bool,
115
118
  };
116
119
 
@@ -25,16 +25,6 @@ export default {
25
25
  defaultValue: { summary: '' },
26
26
  },
27
27
  },
28
- translations: {
29
- name: 'translations',
30
- type: { name: 'object', required: true },
31
- defaultValue: '',
32
- description: 'Translations object',
33
- table: {
34
- type: { summary: 'object' },
35
- defaultValue: { summary: '' },
36
- },
37
- },
38
28
  },
39
29
  parameters: {
40
30
  docs: {
@@ -1,19 +1,20 @@
1
1
  /* eslint-disable react/forbid-prop-types */
2
2
  /* eslint-disable no-unused-expressions */
3
3
  /* eslint-disable import/no-extraneous-dependencies */
4
- import React, { useEffect, useState } from 'react';
4
+ import React, { useEffect, useState, useContext } from 'react';
5
5
  import Slider from 'gatsby-core-theme/src/components/molecules/slider';
6
6
  import PropTypes from 'prop-types';
7
7
  import useWindowSize from 'gatsby-core-theme/src/hooks/useWindowSize';
8
8
  import keygen from 'gatsby-core-theme/src/helpers/keygen';
9
9
  import { translate } from 'gatsby-core-theme/src/helpers/getters';
10
10
  import { isMobileDevice } from 'gatsby-matrix-theme/src/helpers/mobile-detect';
11
+ import { Context } from 'gatsby-core-theme/src/context/TranslationsProvider';
11
12
  import { TiArrowSortedDown, TiArrowSortedUp } from 'react-icons/ti';
12
13
  import Column from '../../../atoms/table/column';
13
14
  import StaticColumn from '../../../atoms/table/staticColumn';
14
15
  import styles from './comparison-table.module.scss';
15
16
 
16
- const Index = ({ module, page }) => {
17
+ const Index = ({ module }) => {
17
18
  const [width] = useWindowSize();
18
19
  const [hideRow, setHideRow] = useState(false);
19
20
  const [licensesMore, setLicensesMore] = useState(true);
@@ -23,8 +24,7 @@ const Index = ({ module, page }) => {
23
24
  const [topFeatures] = useState(111);
24
25
  const [banking] = useState(124);
25
26
  const [licenses, setLicenses] = useState(57);
26
-
27
- const translation = page.translations;
27
+ const { translations } = useContext(Context) || {};
28
28
 
29
29
  useEffect(() => {
30
30
  isMobileDevice() && setHideRow(true);
@@ -54,7 +54,6 @@ const Index = ({ module, page }) => {
54
54
  licenses={licenses}
55
55
  chnageHeights={chnageHeights}
56
56
  hideRow={hideRow}
57
- translations={page.translations}
58
57
  licensesMore={licensesMore}
59
58
  />
60
59
  </div>
@@ -79,7 +78,6 @@ const Index = ({ module, page }) => {
79
78
  licenses={licenses}
80
79
  chnageHeights={chnageHeights}
81
80
  hideRow={hideRow}
82
- translations={page.translations}
83
81
  licensesMore={licensesMore}
84
82
  />
85
83
  {items[i + 1] && (
@@ -94,7 +92,6 @@ const Index = ({ module, page }) => {
94
92
  licenses={licenses}
95
93
  chnageHeights={chnageHeights}
96
94
  hideRow={hideRow}
97
- translations={page.translations}
98
95
  licensesMore={licensesMore}
99
96
  />
100
97
  )}
@@ -110,7 +107,6 @@ const Index = ({ module, page }) => {
110
107
  licenses={licenses}
111
108
  chnageHeights={chnageHeights}
112
109
  hideRow={hideRow}
113
- translations={page.translations}
114
110
  licensesMore={licensesMore}
115
111
  />
116
112
  )}
@@ -131,10 +127,13 @@ const Index = ({ module, page }) => {
131
127
  banking={banking}
132
128
  licenses={licenses}
133
129
  hideRow={hideRow}
134
- translations={page.translations}
135
130
  />
136
131
  {width < 991 && width > 0 && <>{renderOne(module.items[0].items)}</>}
137
- {width >= 991 && <Slider useArrows={false}>{renderThree(module.items[0].items)}</Slider>}
132
+ {width >= 991 && (
133
+ <Slider useArrows={false} gtmClass="comparison-table-carousel-gtm">
134
+ {renderThree(module.items[0].items)}
135
+ </Slider>
136
+ )}
138
137
  </table>
139
138
  {width < 991 && (
140
139
  // eslint-disable-next-line react/button-has-type
@@ -146,12 +145,12 @@ const Index = ({ module, page }) => {
146
145
  >
147
146
  {hideRow ? (
148
147
  <div className={styles.showMoreBtn}>
149
- {translate(translation, 'show_more_details', 'Show more details')}{' '}
148
+ {translate(translations, 'show_more_details', 'Show more details')}{' '}
150
149
  <TiArrowSortedDown />
151
150
  </div>
152
151
  ) : (
153
152
  <div className={styles.showMoreBtn}>
154
- {translate(translation, 'show_less_details', 'Show less details')}
153
+ {translate(translations, 'show_less_details', 'Show less details')}
155
154
  <TiArrowSortedUp />
156
155
  </div>
157
156
  )}
@@ -162,6 +161,5 @@ const Index = ({ module, page }) => {
162
161
  };
163
162
  Index.propTypes = {
164
163
  module: PropTypes.object,
165
- page: PropTypes.object,
166
164
  };
167
165
  export default Index;
@@ -9,7 +9,6 @@ import Row from '../../molecules/toplist/row/variant-one';
9
9
 
10
10
  const TopList = ({ module, toplistHeading, CustomRow, page }) => {
11
11
  const template = page?.template;
12
- const translations = page?.translations;
13
12
  const ComparisonTable =
14
13
  module?.style === 'comparison_table' ? loadable(() => import('./comparison-table')) : null;
15
14
 
@@ -21,14 +20,13 @@ const TopList = ({ module, toplistHeading, CustomRow, page }) => {
21
20
  page={page}
22
21
  />
23
22
  ) : (
24
- <Tabs translations={page.translations} title={module.title} module={module} tabsAlign="right">
23
+ <Tabs title={module.title} module={module} tabsAlign="right" gtmClass="toplist-tabs-menu-gtm">
25
24
  {module.items.map((toplist) => (
26
25
  <div label={toplist.title} key={keygen()}>
27
26
  {toplistHeading}
28
27
  <List
29
28
  toplist={toplist}
30
29
  CustomRow={Row}
31
- translations={translations}
32
30
  hasLoadMoreButton={toplist.show_load_more}
33
31
  initItemsCount={toplist.num_items_initial_load}
34
32
  loadItemsCount={toplist.num_items_load_more}
@@ -48,7 +46,7 @@ TopList.propTypes = {
48
46
  }),
49
47
  toplistHeading: PropTypes.element,
50
48
  CustomRow: PropTypes.func,
51
- page: PropTypes.shape({ template: PropTypes.string, translations: PropTypes.shape({}) }),
49
+ page: PropTypes.shape({ template: PropTypes.string }),
52
50
  };
53
51
 
54
52
  export default TopList;
@@ -1,7 +1,10 @@
1
+ /* eslint-disable import/no-extraneous-dependencies */
1
2
  /* eslint-disable react/prop-types */
2
- import React, { useRef } from 'react';
3
+ import React, { useRef, useContext } from 'react';
3
4
  import PropTypes from 'prop-types';
5
+ import { forceCheck } from 'react-lazyload';
4
6
  import { translate } from 'gatsby-core-theme/src/helpers/getters';
7
+ import { Context } from 'gatsby-core-theme/src/context/TranslationsProvider';
5
8
  import keygen from '~helpers/keygen';
6
9
  import Row from '~molecules/toplist/default-row';
7
10
  import Button from '~atoms/button';
@@ -14,13 +17,12 @@ export default function List({
14
17
  initItemsCount,
15
18
  loadItemsCount,
16
19
  pageTemplate,
17
- translations,
18
20
  }) {
19
21
  const initLoadItems = Number(initItemsCount) !== 0 ? Number(initItemsCount) : 10000;
20
22
  const loadingItems = Number(loadItemsCount) !== 0 ? Number(loadItemsCount) : 10000;
21
23
 
22
24
  const isPPCPage = pageTemplate && pageTemplate.toLowerCase() === 'ppc';
23
-
25
+ const { translations } = useContext(Context) || {};
24
26
  const elRefs = useRef([]);
25
27
 
26
28
  const addToRefs = (el, index) => {
@@ -30,7 +32,9 @@ export default function List({
30
32
  };
31
33
 
32
34
  const loadMoreBtn = useRef(React.createRef());
33
- const showLoadMoreButton = hasLoadMoreButton === '1' && Number(initItemsCount) !== 0;
35
+
36
+ const showLoadMoreButton =
37
+ hasLoadMoreButton === '1' && Number(initItemsCount) < toplist.items.length;
34
38
 
35
39
  function handleClick() {
36
40
  const displayed = elRefs.current.filter((item) => item.classList.contains(styles.show)).length;
@@ -40,8 +44,9 @@ export default function List({
40
44
  nextItem > elRefs.current.length ? elRefs.current.length + 1 : displayed + loadingItems;
41
45
 
42
46
  elRefs.current.slice(displayed, lastItem).forEach((item) => item.classList.toggle(styles.show));
47
+ forceCheck();
43
48
 
44
- if (loadingItems + displayed > elRefs.current.length) {
49
+ if (loadingItems + displayed >= elRefs.current.length) {
45
50
  loadMoreBtn.current.classList.toggle(styles.hide);
46
51
  }
47
52
  }
@@ -61,7 +66,6 @@ export default function List({
61
66
  tracker={toplist.tracker}
62
67
  oneliner={toplist.one_liner}
63
68
  isPPC={isPPCPage}
64
- translations={translations}
65
69
  index={index}
66
70
  />
67
71
  ) : (
@@ -79,6 +83,7 @@ export default function List({
79
83
  onClick={handleClick}
80
84
  invertColors
81
85
  primaryColor={false}
86
+ gtmClass="toplist-loadmore-btn-gtm btn-cta"
82
87
  />
83
88
  </div>
84
89
  )}
@@ -101,5 +106,4 @@ List.propTypes = {
101
106
  initItemsCount: PropTypes.string,
102
107
  loadItemsCount: PropTypes.string,
103
108
  pageTemplate: PropTypes.string,
104
- translations: PropTypes.shape({}),
105
109
  };
@@ -66,4 +66,11 @@
66
66
  > div {
67
67
  padding: 1rem 5rem;
68
68
  }
69
+
70
+ @include max(tablet) {
71
+ button:hover {
72
+ background-color: transparent !important;
73
+ color: #000 !important;
74
+ }
75
+ }
69
76
  }
@@ -0,0 +1,15 @@
1
+ .bonus {
2
+ @include flex-direction(column);
3
+ div:first-child {
4
+ font-size: 2rem;
5
+ font-weight: 700;
6
+ color: var(--primary-color);
7
+ padding-right: 1rem;
8
+ }
9
+ div:nth-child(2) {
10
+ font-size: 1.6rem;
11
+ color: var(--color-22);
12
+ font-weight: 700;
13
+ padding: 0.5rem 0;
14
+ }
15
+ }
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { getBonus } from 'gatsby-core-theme/src/helpers/getters';
4
+ import styles from './bonus.module.scss';
4
5
 
5
6
  export default function Bonus({ item, tracker }) {
6
7
  const oneLiner = getBonus(tracker, item);
@@ -19,9 +20,9 @@ export default function Bonus({ item, tracker }) {
19
20
  }
20
21
 
21
22
  return (
22
- <div>
23
- {!isInoperative && <div>{mainLine && mainLine}</div>}
24
- {!isInoperative && <div>{secondLine && secondLine}</div>}
23
+ <div className={styles.bonus}>
24
+ {!isInoperative && <div className={styles.title}>{mainLine && mainLine}</div>}
25
+ {!isInoperative && <div className={styles.desc}>{secondLine && secondLine}</div>}
25
26
  </div>
26
27
  );
27
28
  }
@@ -1,17 +1,13 @@
1
- import React from 'react';
1
+ import React, { useContext } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { FaAngleRight } from 'react-icons/fa';
4
4
  import { translate } from 'gatsby-core-theme/src/helpers/getters';
5
+ import { Context } from 'gatsby-core-theme/src/context/TranslationsProvider';
5
6
  // eslint-disable-next-line import/no-extraneous-dependencies
6
7
  import styles from './module-title.module.scss';
7
8
  import Link from '~hooks/link';
8
9
 
9
- const ModuleTitle = ({
10
- module,
11
- viewMoreIcon = <FaAngleRight />,
12
- pageContext = null,
13
- translations,
14
- }) => {
10
+ const ModuleTitle = ({ module, viewMoreIcon = <FaAngleRight />, pageContext = null }) => {
15
11
  const tabsToplist = module?.items?.length > 1 && module?.name === 'top_list';
16
12
  const CustomTag = `${module.module_title_tag}`;
17
13
  const monthNames = [
@@ -28,14 +24,16 @@ const ModuleTitle = ({
28
24
  'November',
29
25
  'December',
30
26
  ];
27
+ const { translations } = useContext(Context) || {};
31
28
  const d = new Date();
32
29
  const year = d.getFullYear();
33
30
  const month = monthNames[d.getMonth()];
34
31
  const currentMonth = module.show_last_updated_date
35
32
  ? translate(translations, month, month)
36
33
  : false;
34
+
37
35
  const getTitle = () => {
38
- if (!module?.module_title_tag) {
36
+ if (module?.title) {
39
37
  return (
40
38
  <h2 className={styles.noTag}>
41
39
  {module.title}
@@ -90,7 +88,7 @@ const ModuleTitle = ({
90
88
  </span>
91
89
 
92
90
  {module.link_label && (
93
- <Link to={module.link_value} className={styles.viewMore}>
91
+ <Link to={module.link_value} className={`${styles.viewMore} module-title-gtm`}>
94
92
  {module.link_label}
95
93
  {viewMoreIcon}
96
94
  </Link>
@@ -0,0 +1,24 @@
1
+ /* eslint-disable react/no-unescaped-entities */
2
+ import React from 'react';
3
+ import PropTypes from 'prop-types';
4
+ import Image from 'gatsby-core-theme/src/hooks/gatsby-img';
5
+
6
+ import styles from './not-found.module.scss';
7
+
8
+ const NotFound = ({ imagePath }) => (
9
+ <div className={styles.wrapper}>
10
+ <div className={styles.textBlock}>
11
+ <p>Oops! We can't seem to find that page anymore.</p>
12
+ <p>While you're here though, why not check out these top South African Casinos:</p>
13
+ </div>
14
+ <div className={styles.imgContainer}>
15
+ <Image filename={imagePath} width={381} height={144} alt="Not found" />
16
+ </div>
17
+ </div>
18
+ );
19
+
20
+ NotFound.propTypes = {
21
+ imagePath: PropTypes.string,
22
+ };
23
+
24
+ export default NotFound;
@@ -0,0 +1,17 @@
1
+ .wrapper {
2
+ max-width: var(--main-container-max);
3
+ margin: 0 auto;
4
+ padding: 0 1.6rem;
5
+ margin-top: 8rem;
6
+
7
+ @include min(laptop) {
8
+ margin-top: 0;
9
+ padding: 0 2.4rem;
10
+ }
11
+
12
+ .textBlock {
13
+ @include min(tablet) {
14
+ max-width: 60%;
15
+ }
16
+ }
17
+ }
@@ -20,10 +20,10 @@ const Spotlights = ({ module, page }) => {
20
20
  const img = mode === 'icon' ? item.icon : item.image;
21
21
  return (
22
22
  <>
23
- <span className={styles.itemImage}>
23
+ <span className={`${styles.itemImage} logo-cta`}>
24
24
  <LazyImage alt={item.label} src={imagePrettyUrl(img)} />
25
25
  </span>
26
- <span className={styles.label}>{item.label}</span>
26
+ <span className={`${styles.label} name-cta`}>{item.label}</span>
27
27
  </>
28
28
  );
29
29
  };
@@ -58,11 +58,17 @@ const Spotlights = ({ module, page }) => {
58
58
  {path === 'about-us' ? (
59
59
  <>
60
60
  {item.link.type === 'external' ? (
61
- <a href={item.link.value} title={item.label} target="_blank" rel="noreferrer">
61
+ <a
62
+ href={item.link.value}
63
+ title={item.label}
64
+ target="_blank"
65
+ rel="noreferrer"
66
+ className="spotlights-gtm"
67
+ >
62
68
  {content(item)}
63
69
  </a>
64
70
  ) : (
65
- <Link to={item.link.value} title={item.label}>
71
+ <Link to={item.link.value} title={item.label} className="spotlights-gtm">
66
72
  {content(item)}
67
73
  </Link>
68
74
  )}
@@ -79,14 +85,18 @@ const Spotlights = ({ module, page }) => {
79
85
  title={item.label}
80
86
  target="_blank"
81
87
  rel="noreferrer"
82
- className={styles.readMore}
88
+ className={`${styles.readMore} spotlights-gtm`}
83
89
  >
84
90
  {item.link_text ? item.link_text : 'Read More'}
85
91
  </a>
86
92
  ) : (
87
93
  <>
88
94
  {item.link.value && (
89
- <Link to={item.link.value} title={item.label} className={styles.readMore}>
95
+ <Link
96
+ to={item.link.value}
97
+ title={item.label}
98
+ className={`${styles.readMore} spotlights-gtm`}
99
+ >
90
100
  {see_more_link.title ? see_more_link.title : 'Read More'}
91
101
  </Link>
92
102
  )}
@@ -98,11 +108,17 @@ const Spotlights = ({ module, page }) => {
98
108
  ) : (
99
109
  <div className={styles.pillarCards}>
100
110
  {item.link.type === 'external' ? (
101
- <a href={item.link.value} title={item.label} target="_blank" rel="noreferrer">
111
+ <a
112
+ href={item.link.value}
113
+ title={item.label}
114
+ target="_blank"
115
+ rel="noreferrer"
116
+ className="spotlights-gtm"
117
+ >
102
118
  {content(item)}
103
119
  </a>
104
120
  ) : (
105
- <Link to={item.link.value} title={item.label}>
121
+ <Link to={item.link.value} title={item.label} className="spotlights-gtm">
106
122
  {content(item)}
107
123
  </Link>
108
124
  )}
@@ -120,6 +136,7 @@ const Spotlights = ({ module, page }) => {
120
136
  targetBlank={item.link.type === 'external'}
121
137
  to={item.link.value}
122
138
  primaryColor={false}
139
+ gtmClass="spotlights-gtm btn-cta"
123
140
  />
124
141
  )}
125
142
  </div>