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
@@ -55,6 +55,7 @@ module.exports = {
55
55
  '~helpers': path.resolve(rootPath, '../node_modules/gatsby-core-theme/src/helpers'),
56
56
  '~hooks': path.resolve(rootPath, '../node_modules/gatsby-core-theme/src/hooks'),
57
57
  '~tests': path.resolve(rootPath, '../node_modules/gatsby-core-theme/tests'),
58
+ '~context': path.resolve(rootPath, '../node_modules/gatsby-core-theme/src/context'),
58
59
  };
59
60
  config.resolve.alias['$virtual/lazy-client-sync-requires'] = path.resolve(
60
61
  `./__mocks__/virtual-lazy-client-sync-requires.js`
package/CHANGELOG.md CHANGED
@@ -1,3 +1,105 @@
1
+ # [2.2.0](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v2.1.2...v2.2.0) (2021-11-02)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * added new icon prop in anchor ([13fad13](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/13fad136d1c33f35c4a639004befcbf399a8991f))
7
+ * disabled footer nav on operator type pages ([54ae9e5](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/54ae9e5dd46682b5332d7bd83ebe80c42ffa2c91))
8
+ * fix translations ([06717e9](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/06717e9ae57f19712b369b2930260b0806e2410d))
9
+ * overriden not found component ([a350fb5](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/a350fb5497e25ee787b20ec0dd74d06ea3db62f0))
10
+ * tests and storybook ([badf244](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/badf244d425cf9624337e0046bfe715436a66506))
11
+
12
+
13
+ ### Code Refactoring
14
+
15
+ * add gtm classes ([b3af7b7](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/b3af7b7448aecd3b41997c516f80a2733f5772d5))
16
+ * ranslations fixes and updated core theme ([1e9fce5](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/1e9fce5800cdbc2f921319f64ba995f53aa01d41))
17
+ * remove translations from props ([f9f294a](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/f9f294a5383edf397ef9e0a869b5e3c426483f3e))
18
+ * search reuslts view all link ([366fcab](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/366fcab902d27f764888da2ca7921532585c511b))
19
+ * search reuslts view all link default state ([086d457](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/086d457999a004b8e7bd7d1fab1eac6227061b67))
20
+ * view all results for search auto complete ([5ffa494](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/5ffa49487b753002d6f979a3116c8350afe4ee92))
21
+
22
+
23
+ ### Config
24
+
25
+ * fixed storybook and tests configuration ([c28f244](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/c28f244afbc749fb24bdddad0bfca338fce7a2c2))
26
+ * merge master ([d39deaa](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/d39deaad08afa9b732e677d501ae3801dfdd1940))
27
+ * merge master ([f7e969b](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/f7e969bac78e38a829886d96bfd2a637743f4d82))
28
+ * merge master ([b9ed577](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/b9ed577d5d512c27668eb0c4aa545ee3ff49ddf8))
29
+ * merge master ([bbd2e5f](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/bbd2e5f91b486614cfe9c361e3a5d8e2c4e81a69))
30
+ * merge master ([c1d1437](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/c1d14371943cfa78caf89a800143b565678c96f2))
31
+ * update gatsby core version ([29dacf9](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/29dacf9f6f48cbc822bb157d3bc619a7980e0092))
32
+ * updated core theme version ([0fa3c96](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/0fa3c964726cdd1adea069a80cd6201fd630b15f))
33
+
34
+
35
+ * Merge branch 'tm-2478-search' into 'master' ([9fdd7cc](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/9fdd7ccce442648e4eb3efa56dceeea51522730a))
36
+ * Merge branch 'tm-2462-gtm-classes' into 'master' ([6300fd8](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/6300fd85277bb3a6e5ea303fa9744d5548fec80a))
37
+ * Merge branch 'tm-2564-404page' into 'master' ([161536e](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/161536e27a52992cba85a7388a37f07d917291e6))
38
+ * Merge branch 'tm-2544-matrix-translations' into 'master' ([b1e73ab](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/b1e73ab10c023d2eda62a4afb8f0c5e95f2252cf))
39
+ * Merge branch 'tm-2560-table-stack-style' into 'master' ([d047f4b](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/d047f4b6c2ce4c9922e9ca8f411ad9a363d1fce0))
40
+
41
+
42
+ ### Features
43
+
44
+ * new stack styling for tables on mobile ([6c1007c](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/6c1007c0af3a5fabf06e3e23f6bdcfddba2abb01))
45
+ * remove static 404 page, connect now with hercules data ([28c0ca4](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/28c0ca4d99e8f0da7215d76aefbc84f758b86263))
46
+
47
+ ## [2.1.2](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v2.1.1...v2.1.2) (2021-10-27)
48
+
49
+
50
+ ### Bug Fixes
51
+
52
+ * fix the logic ([c2ab6a4](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/c2ab6a49030a7801ab4ace68274c0701376974d8))
53
+ * toplist bugs ([3d9351c](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/3d9351c3010febf30db76654da2e4fc55489d223))
54
+
55
+
56
+ * Merge branch 'master' of git.ilcd.rocks:team-floyd/themes/matrix-theme ([b88629f](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/b88629fdc318bbd9f641161d29838e4aa3ec9c7d))
57
+ * Merge branch 'TM-2547-cards-v2-title' into 'master' ([24fd68f](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/24fd68f2d225b1dedb6f30c3aeb1cc754591aaea))
58
+
59
+ ## [2.1.1](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v2.1.0...v2.1.1) (2021-10-26)
60
+
61
+
62
+ ### Bug Fixes
63
+
64
+ * override styles on bonus to fix shadowing ([ece2968](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/ece29685398d90f21304eeadfe96f4c174a46719))
65
+ * popup fixes followed up by qa ([cb3ad51](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/cb3ad5150283859e8d2e149bb6e54d8706f2c49a))
66
+
67
+
68
+ ### Code Refactoring
69
+
70
+ * update newsletter style and success modal structure ([b8d6cac](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/b8d6cacd7aea8ff56a30b2879b296869998b98ba))
71
+
72
+
73
+ * Merge branch 'tm-2553-irl-style-fixes' into 'master' ([8d7c1a3](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/8d7c1a36004bfa3fb9b977a5178c49c5a10dcb3c))
74
+ * Merge branch 'tm-2469-popup-fix' into 'master' ([9d95368](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/9d953688ce02e6117d0da83d992265fcf1c3ef5b))
75
+ * Merge branch 'tm-2492-update-newsletter-style' into 'master' ([7d5c6f4](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/7d5c6f4bc059b87044a2a6f34247d1be73b515d5))
76
+
77
+ # [2.1.0](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v2.0.5...v2.1.0) (2021-10-20)
78
+
79
+
80
+ ### Bug Fixes
81
+
82
+ * another style issue ([d76bcb7](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/d76bcb7045a5c37c481d70b29993db973ec5d88c))
83
+ * faq all tags style ([45bff16](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/45bff16e3f00c2f018b4205f43af8e7a19fba3f6))
84
+ * max height faq ([e3da648](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/e3da648f9d46e8039fbf73387a8b54309294f557))
85
+ * style issue ([704a93a](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/704a93aa9e99d70316072d931f2ae50a34bd7df9))
86
+ * styling issues overriden on pcsa ([76806dd](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/76806dde2ed65d6a2d1915943999e143f26a4906))
87
+
88
+
89
+ ### Code Refactoring
90
+
91
+ * correction to search keyword ([f8d1ddf](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/f8d1ddf1307547cbfcfcab570f66cac102354bac))
92
+
93
+
94
+ * Merge branch 'tm-2509-faq-tags-style' into 'master' ([c87422c](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/c87422ca5ca9d0fc1cce60b945e5cb0267b27814))
95
+ * Merge branch 'tm-2469-popup-fix' into 'master' ([7afd323](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/7afd3234f28854feb49e38d6237660003eacbeb4))
96
+ * Merge branch 'tm-2478-search' into 'master' ([1f78305](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/1f783057eb15ffdc8e0c33e50ef3e64182133d5b))
97
+
98
+
99
+ ### Features
100
+
101
+ * search keyword ([741aefd](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/741aefd8921f145815476f3474ab80b043e3e55e))
102
+
1
103
  ## [2.0.5](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v2.0.4...v2.0.5) (2021-10-19)
2
104
 
3
105
 
package/jest.config.js CHANGED
@@ -16,6 +16,7 @@ module.exports = {
16
16
  '^~helpers(.*)$': '<rootDir>/node_modules/gatsby-core-theme/src/helpers$1',
17
17
  '^~hooks(.*)$': '<rootDir>/node_modules/gatsby-core-theme/src/hooks$1',
18
18
  '^~tests(.*)$': '<rootDir>/node_modules/gatsby-core-theme/tests$1',
19
+ '^~context(.*)$': '<rootDir>/node_modules/gatsby-core-theme/src/context$1',
19
20
  // JSON Data
20
21
  'data.json': '<rootDir>/__mocks__/search-data.json',
21
22
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-matrix-theme",
3
- "version": "2.0.5",
3
+ "version": "2.2.0",
4
4
  "main": "index.js",
5
5
  "description": "Matrix Theme NPM Package",
6
6
  "author": "",
@@ -26,7 +26,7 @@
26
26
  "url": "https://storybook-matrix.gigmedia.com/"
27
27
  },
28
28
  "dependencies": {
29
- "gatsby-core-theme": "^1.3.1",
29
+ "gatsby-core-theme": "^1.4.1",
30
30
  "babel-preset-gatsby": "^1.3.0",
31
31
  "chalk": "^4.1.0",
32
32
  "cross-env": "^7.0.2",
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable camelcase */
2
- import React from 'react';
2
+ import React, { useContext } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import Button from 'gatsby-core-theme/src/components/atoms/button';
5
5
  import Link from 'gatsby-core-theme/src/hooks/link';
@@ -11,11 +11,12 @@ import {
11
11
  import LazyImage from 'gatsby-core-theme/src/hooks/lazy-image';
12
12
  import LazyPicture from 'gatsby-core-theme/src/hooks/lazy-picture';
13
13
  import Author from 'gatsby-core-theme/src/components/atoms/author';
14
+ import { Context } from 'gatsby-core-theme/src/context/TranslationsProvider';
14
15
 
15
16
  import BaseCard from '../base-card';
16
17
  import styles from './article-card.module.scss';
17
18
 
18
- const ArticleCard = ({ item, page }) => {
19
+ const ArticleCard = ({ item }) => {
19
20
  const { author, created_at, title, path, banner } = item;
20
21
  const pictureSource = {
21
22
  webp: '../../../../../../../images/default-article.webp',
@@ -25,11 +26,13 @@ const ArticleCard = ({ item, page }) => {
25
26
  const featured = !!cardBackgroundImage;
26
27
  const AuthorProfile = author && author.profile_page_path;
27
28
  const AuthorName = author && author.name;
29
+ const { translations } = useContext(Context) || {};
30
+
28
31
  return (
29
32
  <BaseCard item={item} cardType="article">
30
33
  {!featured && (
31
34
  <div className={styles.cardBanner}>
32
- <Link to={path}>
35
+ <Link to={path} className="article-card-gtm">
33
36
  {banner ? (
34
37
  <LazyImage src={imagePrettyUrl(banner)} alt={title} />
35
38
  ) : (
@@ -43,15 +46,16 @@ const ArticleCard = ({ item, page }) => {
43
46
  </div>
44
47
  )}
45
48
  <div className={`${styles.cardContent} ${featured && styles.featured}`}>
46
- <Link to={path}>
49
+ <Link to={path} className="article-card-gtm">
47
50
  <h2 className={styles.cardTitle}>{title}</h2>
48
51
  </Link>
49
52
  <Button
50
53
  to={path}
51
54
  primaryColor={false}
52
- btnText={translate(page?.translations, 'read_more', 'Read More')}
55
+ btnText={translate(translations, 'read_more', 'Read More')}
53
56
  invertColors={!featured}
54
57
  className={styles.readMore}
58
+ gtmClass="article-card-gtm btn-cta"
55
59
  />
56
60
  <div className={styles.cardMeta}>
57
61
  <Author authorProfile={AuthorProfile} name={AuthorName} date={created_at} />
@@ -69,7 +73,6 @@ ArticleCard.propTypes = {
69
73
  path: PropTypes.string,
70
74
  banner: PropTypes.string,
71
75
  }).isRequired,
72
- page: PropTypes.shape({ translations: PropTypes.shape({}) }),
73
76
  };
74
77
 
75
78
  export default ArticleCard;
@@ -15,7 +15,12 @@ const AuthorCard = ({ item }) => {
15
15
  <div className={styles.txt}>
16
16
  <div className={styles.name}>{name}</div>
17
17
  <div className={styles.position}>{position}</div>
18
- <a className={styles.email} href={`mailto:${email}`} target="_blank" rel="noreferrer">
18
+ <a
19
+ className={`${styles.email} author-card-gtm`}
20
+ href={`mailto:${email}`}
21
+ target="_blank"
22
+ rel="noreferrer"
23
+ >
19
24
  {email}
20
25
  </a>
21
26
  </div>
@@ -26,7 +26,7 @@ const BaseCard = ({
26
26
  <div className={styles.cardWrapper}>
27
27
  {featured &&
28
28
  (isLinked ? (
29
- <Link to={path} title={title} className={styles.cardLink}>
29
+ <Link to={path} title={title} className={`${styles.cardLink} base-card-gtm`}>
30
30
  {imgContent}
31
31
  </Link>
32
32
  ) : (
@@ -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 { FaStar } from 'react-icons/fa';
4
4
  import StarRating from 'gatsby-core-theme/src/components/molecules/star-rating';
@@ -10,25 +10,28 @@ import {
10
10
  translate,
11
11
  } from 'gatsby-core-theme/src/helpers/getters';
12
12
  import LazyImage from 'gatsby-core-theme/src/hooks/lazy-image';
13
+ import { Context } from 'gatsby-core-theme/src/context/TranslationsProvider';
13
14
 
14
15
  import BaseCard from '../base-card';
15
16
  import styles from './game-card.module.scss';
16
17
 
17
- const GameCard = ({ item, page, button_text = 'play_now' }) => {
18
+ const GameCard = ({ item, button_text = 'play_now' }) => {
18
19
  const { relation, title, path, banner } = item;
19
20
  const cardBackgroundImage = getSectionExtraField(null, item, 'card_background_image');
20
21
  const featured = !!cardBackgroundImage;
22
+ const { translations } = useContext(Context) || {};
23
+
21
24
  return (
22
25
  <BaseCard item={item} isLinked cardType="game">
23
26
  {!featured && (
24
27
  <div className={styles.cardBanner}>
25
- <Link to={path}>
28
+ <Link to={path} className="game-card-gtm">
26
29
  <LazyImage src={imagePrettyUrl(banner)} alt={title} />
27
30
  </Link>
28
31
  </div>
29
32
  )}
30
33
  <div className={`${styles.cardContent} ${featured && styles.featured}`}>
31
- <Link to={path}>
34
+ <Link to={path} className="game-card-gtm">
32
35
  <h2 className={styles.cardTitle}>{title}</h2>
33
36
  </Link>
34
37
  <div className={styles.cardMeta}>
@@ -53,8 +56,9 @@ const GameCard = ({ item, page, button_text = 'play_now' }) => {
53
56
  <Button
54
57
  to={path}
55
58
  primaryColor={!featured}
56
- btnText={translate(page?.translations, button_text, 'Play now')}
59
+ btnText={translate(translations, button_text, 'Play now')}
57
60
  className={styles.playNow}
61
+ gtmClass="game-card-gtm btn-cta"
58
62
  />
59
63
  </div>
60
64
  </BaseCard>
@@ -74,7 +78,6 @@ GameCard.propTypes = {
74
78
  path: PropTypes.string,
75
79
  banner: PropTypes.string,
76
80
  }).isRequired,
77
- page: PropTypes.shape({ translations: PropTypes.shape({}) }),
78
81
  button_text: PropTypes.string,
79
82
  };
80
83
 
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable camelcase */
2
- import React from 'react';
2
+ import React, { useContext } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { FaStar } from 'react-icons/fa';
5
5
  import StarRating from 'gatsby-core-theme/src/components/molecules/star-rating';
@@ -9,10 +9,11 @@ import Link from 'gatsby-core-theme/src/hooks/link';
9
9
  import LazyImage from 'gatsby-core-theme/src/hooks/lazy-image';
10
10
  import Bonus from 'gatsby-core-theme/src/components/atoms/bonus';
11
11
  import Tnc from 'gatsby-core-theme/src/components/molecules/tnc';
12
+ import { Context } from 'gatsby-core-theme/src/context/TranslationsProvider';
12
13
  import BaseCard from '../base-card';
13
14
  import styles from './operator-card.module.scss';
14
15
 
15
- const OperatorCard = ({ item, page, featured = false, number }) => {
16
+ const OperatorCard = ({ item, featured = false, number }) => {
16
17
  const { relation, path } = item;
17
18
  const prettyLink = prettyTracker(relation);
18
19
  const reviewPath = path || relation.path;
@@ -20,6 +21,7 @@ const OperatorCard = ({ item, page, featured = false, number }) => {
20
21
  const isActive = status === 'active';
21
22
  const isInactive = status === 'inactive';
22
23
  const backgroundImage = number === 1 ? 'featuredCasino' : null;
24
+ const { translations } = useContext(Context) || {};
23
25
 
24
26
  return (
25
27
  <BaseCard featured={featured} backgroundImage={backgroundImage} item={item} cardType="operator">
@@ -28,7 +30,11 @@ const OperatorCard = ({ item, page, featured = false, number }) => {
28
30
  backgroundImage && styles.hasBackground
29
31
  }`}
30
32
  >
31
- <Link to={reviewPath} title={relation.name} className={styles.casinoLogo}>
33
+ <Link
34
+ to={reviewPath}
35
+ title={relation.name}
36
+ className={`${styles.casinoLogo} operator-card-gtm`}
37
+ >
32
38
  <LazyImage src={imagePrettyUrl(relation.logo_url)} alt={relation.name} />
33
39
  </Link>
34
40
  <StarRating
@@ -46,7 +52,7 @@ const OperatorCard = ({ item, page, featured = false, number }) => {
46
52
  >
47
53
  <div className={styles.casinoText}>
48
54
  <div className={styles.casinoName}>
49
- <Link to={reviewPath} title={relation.name}>
55
+ <Link to={reviewPath} title={relation.name} className="operator-card-gtm">
50
56
  {relation.name}
51
57
  </Link>
52
58
  </div>
@@ -60,17 +66,18 @@ const OperatorCard = ({ item, page, featured = false, number }) => {
60
66
  }`}
61
67
  >
62
68
  <div className={styles.reviewLink}>
63
- <Link to={reviewPath} title={relation.name}>
64
- {`${relation.name} ${translate(page?.translations, 'read_review', 'Review')}`}
69
+ <Link to={reviewPath} title={relation.name} className="operator-card-gtm">
70
+ {`${relation.name} ${translate(translations, 'read_review', 'Review')}`}
65
71
  </Link>
66
72
  </div>
67
73
  <div className={`${styles.cardButtons}`}>
68
74
  {isActive && (
69
75
  <Button
70
76
  to={prettyLink}
71
- btnText={translate(page?.translations, 'play_now', 'Sign Up')}
77
+ btnText={translate(translations, 'play_now', 'Sign Up')}
72
78
  isInternalLink={false}
73
79
  disabled={!isActive}
80
+ gtmClass="operator-card-gtm btn-cta"
74
81
  />
75
82
  )}
76
83
  </div>
@@ -99,7 +106,6 @@ OperatorCard.propTypes = {
99
106
  }),
100
107
  path: PropTypes.string,
101
108
  }).isRequired,
102
- page: PropTypes.shape({ translations: PropTypes.shape({}) }),
103
109
  featured: PropTypes.bool,
104
110
  number: PropTypes.number,
105
111
  };
@@ -1,26 +1,27 @@
1
- import React from 'react';
1
+ import React, { useContext } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import Link from 'gatsby-core-theme/src/hooks/link';
4
4
  import LazyImage from 'gatsby-core-theme/src/hooks/lazy-image';
5
5
  import { imagePrettyUrl, textWordsLimit, translate } from 'gatsby-core-theme/src/helpers/getters';
6
6
  import Button from 'gatsby-core-theme/src/components/atoms/button';
7
+ import { Context } from 'gatsby-core-theme/src/context/TranslationsProvider';
7
8
 
8
9
  import BaseCard from '../base-card/index';
9
10
  import styles from './payment-method-card.module.scss';
10
11
 
11
- const PaymentMethodCard = ({ item, page, showTitle = true, showDesc = true }) => {
12
+ const PaymentMethodCard = ({ item, showTitle = true, showDesc = true }) => {
12
13
  const { title, path, relation, sections } = item;
13
- const translations = page?.translations;
14
+ const { translations } = useContext(Context) || {};
14
15
 
15
16
  return (
16
17
  <BaseCard item={item} cardType="payment_method">
17
18
  <div className={styles.content}>
18
19
  <div className={styles.header}>
19
- <Link className={styles.links} to={path}>
20
+ <Link className={`${styles.links} payment-method-card-gtm`} to={path}>
20
21
  <LazyImage className={styles.logo} src={imagePrettyUrl(relation?.logo)} />
21
22
  </Link>
22
23
  {showTitle && (
23
- <Link className={styles.links} to={path}>
24
+ <Link className={`${styles.links} payment-method-card-gtm`} to={path}>
24
25
  <h2 className={styles.title}>{title}</h2>
25
26
  </Link>
26
27
  )}
@@ -34,7 +35,11 @@ const PaymentMethodCard = ({ item, page, showTitle = true, showDesc = true }) =>
34
35
  </div>
35
36
  )}
36
37
  <div className={styles.bottom}>
37
- <Button to={path} btnText={translate(translations, 'read_more', 'Read More')} />
38
+ <Button
39
+ to={path}
40
+ btnText={translate(translations, 'read_more', 'Read More')}
41
+ gtmClass="payment-method-card-gtm btn-cta"
42
+ />
38
43
  </div>
39
44
  </div>
40
45
  </BaseCard>
@@ -43,9 +48,6 @@ const PaymentMethodCard = ({ item, page, showTitle = true, showDesc = true }) =>
43
48
  PaymentMethodCard.propTypes = {
44
49
  showTitle: PropTypes.bool,
45
50
  showDesc: PropTypes.bool,
46
- page: PropTypes.shape({
47
- translations: PropTypes.shape({}),
48
- }),
49
51
  item: PropTypes.shape({
50
52
  title: PropTypes.string,
51
53
  path: PropTypes.string,
@@ -6,7 +6,7 @@ import { imagePrettyUrl } from 'gatsby-core-theme/src/helpers/getters';
6
6
 
7
7
  import styles from './popup-card.module.scss';
8
8
 
9
- const PopupCard = ({ item, translations }) => {
9
+ const PopupCard = ({ item, tracker }) => {
10
10
  const { logo_url: logoUrl } = item;
11
11
  const oneLiner = item?.one_liners?.main?.one_liner;
12
12
  const secondLiner = item?.one_liners?.secondary?.one_liner;
@@ -19,7 +19,7 @@ const PopupCard = ({ item, translations }) => {
19
19
  <div className={styles.popupCard}>
20
20
  <div className={styles.wrapper}>
21
21
  <div className={styles.imgContainer}>
22
- <img src={imagePrettyUrl(logoUrl)} alt={oneLiner} />
22
+ <img width={98} height={98} src={imagePrettyUrl(logoUrl)} alt={oneLiner} />
23
23
  </div>
24
24
  <div className={styles.textContainer}>
25
25
  <p className={styles.primaryText}>{one}</p>
@@ -28,10 +28,10 @@ const PopupCard = ({ item, translations }) => {
28
28
  </div>
29
29
  <div className={styles.buttonContainer}>
30
30
  <OperatorCta
31
- tracker="popup"
31
+ tracker={tracker}
32
32
  operator={item}
33
- translations={translations}
34
33
  playText="Play Now"
34
+ gtmClass="popup-operator-cta-gtm"
35
35
  />
36
36
  </div>
37
37
  </div>
@@ -53,7 +53,7 @@ PopupCard.propTypes = {
53
53
  }),
54
54
  }),
55
55
  }),
56
- translations: PropTypes.shape({}),
56
+ tracker: PropTypes.string,
57
57
  };
58
58
 
59
59
  export default PopupCard;
@@ -20,11 +20,13 @@
20
20
  }
21
21
 
22
22
  .imgContainer {
23
- min-width: 8rem;
23
+ width: 8rem;
24
24
  height: 8rem;
25
+ min-width: 8rem;
25
26
 
26
27
  @include min(tablet) {
27
28
  min-width: 9.8rem;
29
+ width: 9.8rem;
28
30
  height: 9.8rem;
29
31
  }
30
32
 
@@ -32,6 +34,7 @@
32
34
  width: 100%;
33
35
  height: 100%;
34
36
  border-radius: 0.4rem;
37
+ object-fit: contain;
35
38
  }
36
39
  }
37
40
 
@@ -80,13 +83,9 @@
80
83
  }
81
84
 
82
85
  a {
83
- background-color: var(--secondary-color) !important;
84
86
  border-radius: 4px;
85
- box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.3);
86
-
87
- &:hover {
88
- background: var(--secondary-color) !important;
89
- }
87
+ font-weight: 700;
88
+ font-size: 1.8rem;
90
89
  }
91
90
  }
92
91
  }
@@ -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,16 +1,16 @@
1
- import React from 'react';
1
+ import React, { useContext } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import Link from 'gatsby-core-theme/src/hooks/link';
4
4
  import LazyImage from 'gatsby-core-theme/src/hooks/lazy-image';
5
5
  import { imagePrettyUrl, textWordsLimit, translate } from 'gatsby-core-theme/src/helpers/getters';
6
6
  import Button from 'gatsby-core-theme/src/components/atoms/button';
7
+ import { Context } from 'gatsby-core-theme/src/context/TranslationsProvider';
7
8
 
8
9
  import BaseCard from '../base-card/index';
9
10
  import styles from './software-provider-card.module.scss';
10
11
 
11
12
  const SoftwareProviderCard = ({
12
13
  item,
13
- page,
14
14
  showTitle = true,
15
15
  showProvider = true,
16
16
  showDesc = true,
@@ -20,17 +20,17 @@ const SoftwareProviderCard = ({
20
20
  },
21
21
  }) => {
22
22
  const { title, path, relation, sections } = item;
23
- const translations = page?.translations;
23
+ const { translations } = useContext(Context) || {};
24
24
 
25
25
  return (
26
26
  <BaseCard item={item} cardType="software_provider">
27
27
  <div className={styles.content}>
28
28
  <div className={styles.header}>
29
- <Link className={styles.links} to={path}>
29
+ <Link className={`${styles.links} software-provider-card-gtm`} to={path}>
30
30
  <LazyImage className={styles.logo} src={imagePrettyUrl(relation?.logo)} />
31
31
  </Link>
32
32
  {showTitle && (
33
- <Link className={styles.links} to={path}>
33
+ <Link className={`${styles.links} software-provider-card-gtm`} to={path}>
34
34
  <h2 className={styles.title}>{title}</h2>
35
35
  </Link>
36
36
  )}
@@ -51,7 +51,11 @@ const SoftwareProviderCard = ({
51
51
  {gameProvider.textTwo}
52
52
  </p>
53
53
  )}
54
- <Button to={path} btnText={translate(translations, 'read_more', 'Read More')} />
54
+ <Button
55
+ to={path}
56
+ btnText={translate(translations, 'read_more', 'Read More')}
57
+ gtmClass="software-provider-card-gtm btn-cta"
58
+ />
55
59
  </div>
56
60
  </div>
57
61
  </BaseCard>
@@ -65,9 +69,6 @@ SoftwareProviderCard.propTypes = {
65
69
  textOne: PropTypes.string,
66
70
  textTwo: PropTypes.string,
67
71
  }),
68
- page: PropTypes.shape({
69
- translations: PropTypes.shape({}),
70
- }),
71
72
  item: PropTypes.shape({
72
73
  title: PropTypes.string,
73
74
  path: PropTypes.string,
@@ -11,7 +11,7 @@ const LinkMenu = ({ section }) => {
11
11
  return (
12
12
  <div className={styles.linkMenuContainer}>
13
13
  <div className={styles.linkMenuContent}>
14
- <LinkList lists={menuArray} listIcon={<FaChevronRight />} />
14
+ <LinkList lists={menuArray} listIcon={<FaChevronRight />} gtmClass="link-menu-gtm" />
15
15
  </div>
16
16
  </div>
17
17
  );