gatsby-matrix-theme 2.1.2 → 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 (88) hide show
  1. package/.storybook/main.js +1 -0
  2. package/CHANGELOG.md +46 -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 +2 -3
  12. package/src/components/atoms/cards/popup-card/popup-card.stories.js +0 -10
  13. package/src/components/atoms/cards/software-provider-card/index.js +10 -9
  14. package/src/components/atoms/link-menu/index.js +1 -1
  15. package/src/components/atoms/operator-bonuses/index.js +10 -7
  16. package/src/components/atoms/search/autocomplete/article.js +1 -1
  17. package/src/components/atoms/search/autocomplete/game.js +1 -1
  18. package/src/components/atoms/search/autocomplete/operator.js +1 -1
  19. package/src/components/atoms/search/autocomplete/payment_methods.js +1 -1
  20. package/src/components/atoms/search/autocomplete/software_provider.js +1 -1
  21. package/src/components/atoms/table/banking/index.js +24 -20
  22. package/src/components/atoms/table/column/index.js +2 -5
  23. package/src/components/atoms/table/staticColumn/index.js +28 -33
  24. package/src/components/molecules/faq/index.js +1 -1
  25. package/src/components/molecules/game-iframe/index.js +6 -1
  26. package/src/components/molecules/game-score-gauge/game-score-gauge.stories.js +7 -12
  27. package/src/components/molecules/game-score-gauge/index.js +4 -2
  28. package/src/components/molecules/info-grid/index.js +1 -0
  29. package/src/components/molecules/newsletter/index.js +1 -0
  30. package/src/components/molecules/newsletter/newsletter.stories.js +106 -112
  31. package/src/components/molecules/newsletter-optin/index.js +7 -7
  32. package/src/components/molecules/newsletter-optin/newsletter-optin.stories.js +79 -80
  33. package/src/components/molecules/operator-summary/index.js +8 -2
  34. package/src/components/molecules/small-welcome-bonus/index.js +19 -6
  35. package/src/components/molecules/small-welcome-bonus/small-welcome-bonus.stories.js +49 -53
  36. package/src/components/molecules/toplist/row/variant-one.js +26 -10
  37. package/src/components/organisms/footer-navigation/index.js +9 -1
  38. package/src/components/organisms/popup/index.js +6 -5
  39. package/src/components/organisms/popup/popup.stories.js +0 -10
  40. package/src/components/organisms/toplist/comparison-table/index.js +11 -13
  41. package/src/components/organisms/toplist/index.js +2 -4
  42. package/src/components/organisms/toplist/list/index.js +4 -5
  43. package/src/gatsby-core-theme/components/atoms/module-title/index.js +5 -8
  44. package/src/gatsby-core-theme/components/atoms/not-found/index.js +24 -0
  45. package/src/gatsby-core-theme/components/atoms/not-found/not-found.module.scss +17 -0
  46. package/src/gatsby-core-theme/components/atoms/spotlights/index.js +25 -8
  47. package/src/gatsby-core-theme/components/molecules/content/content.module.scss +73 -16
  48. package/src/gatsby-core-theme/components/molecules/content/index.js +2 -0
  49. package/src/gatsby-core-theme/components/molecules/footer/index.js +5 -1
  50. package/src/gatsby-core-theme/components/molecules/main/index.js +6 -1
  51. package/src/gatsby-core-theme/components/molecules/module/index.js +1 -3
  52. package/src/gatsby-core-theme/components/molecules/search/index.js +26 -3
  53. package/src/gatsby-core-theme/components/organisms/anchor/anchor.module.scss +5 -1
  54. package/src/gatsby-core-theme/components/organisms/anchor/index.js +11 -2
  55. package/src/gatsby-core-theme/components/organisms/carousel/index.js +17 -6
  56. package/src/gatsby-core-theme/components/organisms/navigation/index.js +2 -2
  57. package/src/gatsby-core-theme/components/organisms/search/index.js +2 -1
  58. package/src/gatsby-core-theme/components/pages/body/index.js +14 -9
  59. package/src/gatsby-core-theme/components/pages/search/index.js +79 -74
  60. package/src/hooks/tabs/index.js +6 -4
  61. package/src/hooks/tabs/tab/tab-list.js +4 -1
  62. package/src/hooks/tabs/tab/tab.js +37 -28
  63. package/storybook/public/{0.a9b647e1.iframe.bundle.js → 0.a5c4cf9f.iframe.bundle.js} +1 -1
  64. package/storybook/public/{1.94c59b7e.iframe.bundle.js → 1.b2b72c50.iframe.bundle.js} +1 -1
  65. package/storybook/public/{10.727dd594.iframe.bundle.js → 10.502b5ac2.iframe.bundle.js} +1 -1
  66. package/storybook/public/{11.2e850035.iframe.bundle.js → 11.30535586.iframe.bundle.js} +1 -1
  67. package/storybook/public/{5.fed35abd.iframe.bundle.js → 5.66b5b921.iframe.bundle.js} +3 -3
  68. package/storybook/public/{5.fed35abd.iframe.bundle.js.LICENSE.txt → 5.66b5b921.iframe.bundle.js.LICENSE.txt} +0 -0
  69. package/storybook/public/5.66b5b921.iframe.bundle.js.map +1 -0
  70. package/storybook/public/{6.a63e093c.iframe.bundle.js → 6.89431426.iframe.bundle.js} +1 -1
  71. package/storybook/public/{7.4996d626.iframe.bundle.js → 7.a53e817b.iframe.bundle.js} +1 -1
  72. package/storybook/public/8.e043e6dc.iframe.bundle.js +3 -0
  73. package/storybook/public/{8.f4491507.iframe.bundle.js.LICENSE.txt → 8.e043e6dc.iframe.bundle.js.LICENSE.txt} +0 -0
  74. package/storybook/public/8.e043e6dc.iframe.bundle.js.map +1 -0
  75. package/storybook/public/{9.3097c14c.iframe.bundle.js → 9.eba0e7c0.iframe.bundle.js} +1 -1
  76. package/storybook/public/iframe.html +1 -1
  77. package/storybook/public/main.c07025f4.iframe.bundle.js +1 -0
  78. package/storybook/public/{runtime~main.941ed6de.iframe.bundle.js → runtime~main.c4f3a4d6.iframe.bundle.js} +1 -1
  79. package/storybook/public/vendors~main.8050786b.iframe.bundle.js +7 -0
  80. package/storybook/public/{vendors~main.f3d8ec5b.iframe.bundle.js.LICENSE.txt → vendors~main.8050786b.iframe.bundle.js.LICENSE.txt} +0 -0
  81. package/storybook/public/vendors~main.8050786b.iframe.bundle.js.map +1 -0
  82. package/src/gatsby-core-theme/pages/404/index.js +0 -66
  83. package/storybook/public/5.fed35abd.iframe.bundle.js.map +0 -1
  84. package/storybook/public/8.f4491507.iframe.bundle.js +0 -3
  85. package/storybook/public/8.f4491507.iframe.bundle.js.map +0 -1
  86. package/storybook/public/main.920f3ab1.iframe.bundle.js +0 -1
  87. package/storybook/public/vendors~main.f3d8ec5b.iframe.bundle.js +0 -7
  88. package/storybook/public/vendors~main.f3d8ec5b.iframe.bundle.js.map +0 -1
@@ -1,97 +1,96 @@
1
+ /* eslint-disable import/no-extraneous-dependencies */
1
2
  import React from 'react';
2
3
  import {
3
- Title,
4
- Description,
5
- Primary,
6
- PRIMARY_STORY,
7
- ArgsTable,
4
+ Title,
5
+ Description,
6
+ Primary,
7
+ PRIMARY_STORY,
8
+ ArgsTable,
8
9
  } from '@storybook/addon-docs/blocks';
9
10
 
10
11
  import Newsletter from '.';
11
12
 
12
13
  export default {
13
- title: 'Matrix-Theme/Molecules/Newsletter Optin',
14
- component: Newsletter,
15
- argTypes: {
16
- page: {
17
- name: 'page',
18
- type: { name: 'object', required: true },
19
- defaultValue: null,
20
- description: 'The page object.',
21
- table: {
22
- type: { summary: 'object' },
23
- defaultValue: { summary: null },
24
- },
25
- },
26
- title: {
27
- name: 'title',
28
- type: { name: 'string', required: false },
29
- defaultValue: 'Exclusive Casino Offers and Free Spins straight to your Inbox',
30
- description: `This text message will show on top of Newsletter as a title.`,
31
- table: {
32
- type: { summary: 'string' },
33
- defaultValue: { summary: 'Exclusive Casino Offers and Free Spins straight to your Inbox' },
34
- },
35
- },
36
- description: {
37
- name: 'description',
38
- defaultValue: 'Subscribe below to be the first to get notified of exclusive casino offers, free spins and bonuses - conveniently via email or SMS. We won’t flood your inbox, but just give you the good stuff in the right way!',
39
- description: `This text message will be shown below the title.`,
40
- table: {
41
- type: {summary: 'string'},
42
- defaultValue: {summary: 'Subscribe below to be the first to get notified of exclusive casino offers, free spins and bonuses - conveniently via email or SMS. We won’t flood your inbox, but just give you the good stuff in the right way!'}
43
- },
44
- },
45
- terms: {
46
- name : 'terms',
47
- defaultValue: 'I confirm that I am 18+ years old and Irish resident.',
48
- description: `This text message shows Terms and Conditions.`,
49
- table: {
50
- type: {summary: 'string'},
51
- defaultValue: {summary: 'I confirm that I am 18+ years old and Irish resident.'}
52
- },
53
- },
54
- privacy_text: {
55
- name: 'privacy_text',
56
- defaultValue: 'Read our Privacy Policy for more details.',
57
- description: `This text message shows the URL for Privacy Policy.`,
58
- table: {
59
- type: {summary: 'string'},
60
- defaultValue: {summary: 'Read our Privacy Policy for more details.'}
61
- },
62
- },
14
+ title: 'Matrix-Theme/Molecules/Newsletter Optin',
15
+ component: Newsletter,
16
+ argTypes: {
17
+ page: {
18
+ name: 'page',
19
+ type: { name: 'object', required: true },
20
+ defaultValue: null,
21
+ description: 'The page object.',
22
+ table: {
23
+ type: { summary: 'object' },
24
+ defaultValue: { summary: null },
25
+ },
63
26
  },
64
- parameters: {
65
- docs: {
66
- description: {
67
- component:
68
- 'Generates Newsletter Optin form on PPC pages.',
69
- },
70
- page: () => (
71
- <>
72
- <Title />
73
- <Description />
74
- <Primary />
75
- <ArgsTable story={PRIMARY_STORY} />
76
- </>
77
- ),
27
+ title: {
28
+ name: 'title',
29
+ type: { name: 'string', required: false },
30
+ defaultValue: 'Exclusive Casino Offers and Free Spins straight to your Inbox',
31
+ description: `This text message will show on top of Newsletter as a title.`,
32
+ table: {
33
+ type: { summary: 'string' },
34
+ defaultValue: { summary: 'Exclusive Casino Offers and Free Spins straight to your Inbox' },
35
+ },
36
+ },
37
+ description: {
38
+ name: 'description',
39
+ defaultValue:
40
+ 'Subscribe below to be the first to get notified of exclusive casino offers, free spins and bonuses - conveniently via email or SMS. We won’t flood your inbox, but just give you the good stuff in the right way!',
41
+ description: `This text message will be shown below the title.`,
42
+ table: {
43
+ type: { summary: 'string' },
44
+ defaultValue: {
45
+ summary:
46
+ 'Subscribe below to be the first to get notified of exclusive casino offers, free spins and bonuses - conveniently via email or SMS. We won’t flood your inbox, but just give you the good stuff in the right way!',
78
47
  },
48
+ },
49
+ },
50
+ terms: {
51
+ name: 'terms',
52
+ defaultValue: 'I confirm that I am 18+ years old and Irish resident.',
53
+ description: `This text message shows Terms and Conditions.`,
54
+ table: {
55
+ type: { summary: 'string' },
56
+ defaultValue: { summary: 'I confirm that I am 18+ years old and Irish resident.' },
57
+ },
58
+ },
59
+ privacy_text: {
60
+ name: 'privacy_text',
61
+ defaultValue: 'Read our Privacy Policy for more details.',
62
+ description: `This text message shows the URL for Privacy Policy.`,
63
+ table: {
64
+ type: { summary: 'string' },
65
+ defaultValue: { summary: 'Read our Privacy Policy for more details.' },
66
+ },
79
67
  },
68
+ },
69
+ parameters: {
70
+ docs: {
71
+ description: {
72
+ component: 'Generates Newsletter Optin form on PPC pages.',
73
+ },
74
+ page: () => (
75
+ <>
76
+ <Title />
77
+ <Description />
78
+ <Primary />
79
+ <ArgsTable story={PRIMARY_STORY} />
80
+ </>
81
+ ),
82
+ },
83
+ },
80
84
  };
81
85
 
82
86
  const Template = (args) => <Newsletter {...args} />;
83
87
 
84
88
  export const Default = Template.bind({});
85
89
  Default.args = {
86
- page: {
87
- translations:{
88
- first_name: 'First Name',
89
- email: 'E-Mail',
90
- phone_number: 'Phone Number'
91
- }
92
- },
93
- title: 'Exclusive Casino Offers and Free Spins straight to your Inbox',
94
- description: 'Subscribe below to be the first to get notified of exclusive casino offers, free spins and bonuses - conveniently via email or SMS. We won’t flood your inbox, but just give you the good stuff in the right way!',
95
- terms: 'I confirm that I am 18+ years old and Irish resident.',
96
- privacy_text: 'Read our Privacy Policy for more details.'
90
+ page: {},
91
+ title: 'Exclusive Casino Offers and Free Spins straight to your Inbox',
92
+ description:
93
+ 'Subscribe below to be the first to get notified of exclusive casino offers, free spins and bonuses - conveniently via email or SMS. We won’t flood your inbox, but just give you the good stuff in the right way!',
94
+ terms: 'I confirm that I am 18+ years old and Irish resident.',
95
+ privacy_text: 'Read our Privacy Policy for more details.',
97
96
  };
@@ -41,7 +41,13 @@ const OperatorSummary = ({
41
41
  <ConditionalWrapper
42
42
  condition={activeOperator}
43
43
  wrapper={(item) => (
44
- <a href={prettyLink} title={operatorName} target="_blank" rel="noreferrer">
44
+ <a
45
+ href={prettyLink}
46
+ title={operatorName}
47
+ target="_blank"
48
+ rel="noreferrer"
49
+ className="operator-summary-gtm"
50
+ >
45
51
  {item}
46
52
  </a>
47
53
  )}
@@ -53,7 +59,7 @@ const OperatorSummary = ({
53
59
  className={styles.summary}
54
60
  dangerouslySetInnerHTML={{ __html: page.extra_fields.summary }}
55
61
  />
56
- <OperatorCta operator={operatorData} />
62
+ <OperatorCta operator={operatorData} gtmClass="operator-summary-operator-cta-gtm" />
57
63
  {operatorData?.extra_fields?.terms_and_conditions_text_enabled === '1' && (
58
64
  <Tnc hasCollapse={false} operator={operatorData} />
59
65
  )}
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable react/prop-types */
2
2
  /* eslint-disable camelcase */
3
- import React from 'react';
3
+ import React, { useContext } from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import {
6
6
  prettyTracker,
@@ -9,6 +9,7 @@ import {
9
9
  getBonus,
10
10
  } from 'gatsby-core-theme/src/helpers/getters';
11
11
  import LazyImage from 'gatsby-core-theme/src/hooks/lazy-image';
12
+ import { Context } from 'gatsby-core-theme/src/context/TranslationsProvider';
12
13
  import { isMobileDevice } from '../../../helpers/mobile-detect';
13
14
 
14
15
  import styles from './small-welcome-bonus.module.scss';
@@ -16,14 +17,14 @@ import styles from './small-welcome-bonus.module.scss';
16
17
  const Index = ({ page }) => {
17
18
  const operator = page?.extra_fields?.game_review_summary_operator;
18
19
  const { logo_url, status } = operator;
19
- const translates = page?.translations;
20
+ const { translations } = useContext(Context) || {};
20
21
  const isMobile = isMobileDevice();
21
22
  const prettyLink = prettyTracker(operator);
22
- let playNow = translate(translates, 'play_now', 'Play now');
23
+ let playNow = translate(translations, 'play_now', 'Play now');
23
24
  const bonus = getBonus('main', operator);
24
25
 
25
26
  if (isMobile) {
26
- playNow = `> ${translate(translates, 'play_for_real_at', 'Play for real at')} @ ${
27
+ playNow = `> ${translate(translations, 'play_for_real_at', 'Play for real at')} @ ${
27
28
  operator.name
28
29
  }`;
29
30
  }
@@ -33,7 +34,13 @@ const Index = ({ page }) => {
33
34
  <div className={styles.content}>
34
35
  <div className={styles.desc}>
35
36
  <div className={styles.logo}>
36
- <a href={prettyLink} title={operator.name} target="_blank" rel="noreferrer">
37
+ <a
38
+ href={prettyLink}
39
+ title={operator.name}
40
+ target="_blank"
41
+ rel="noreferrer"
42
+ className="small-welcome-bonus-gtm logo-cta"
43
+ >
37
44
  <LazyImage
38
45
  width={120}
39
46
  height={50}
@@ -46,7 +53,13 @@ const Index = ({ page }) => {
46
53
  </div>
47
54
  <div className={styles.ctaButton}>
48
55
  {status === 'active' && (
49
- <a href={prettyLink} title={operator.name} target="_blank" rel="noreferrer">
56
+ <a
57
+ href={prettyLink}
58
+ title={operator.name}
59
+ target="_blank"
60
+ rel="noreferrer"
61
+ className="small-welcome-bonus-gtm"
62
+ >
50
63
  {' '}
51
64
  {playNow}{' '}
52
65
  </a>
@@ -1,64 +1,60 @@
1
+ /* eslint-disable import/no-extraneous-dependencies */
1
2
  import React from 'react';
2
3
  import {
3
- Title,
4
- Description,
5
- Primary,
6
- PRIMARY_STORY,
7
- ArgsTable,
4
+ Title,
5
+ Description,
6
+ Primary,
7
+ PRIMARY_STORY,
8
+ ArgsTable,
8
9
  } from '@storybook/addon-docs/blocks';
9
10
  import SmallWelcomeBonus from '.';
10
11
 
11
12
  export default {
12
- title: 'Matrix-Theme/Molecules/SmallWelcomeBonus',
13
- component: SmallWelcomeBonus,
14
- argTypes: {
15
- page: {
16
- name: 'page',
17
- type: { name: 'object', required: true },
18
- defaultValue: null,
19
- description: 'The page object.',
20
- },
13
+ title: 'Matrix-Theme/Molecules/SmallWelcomeBonus',
14
+ component: SmallWelcomeBonus,
15
+ argTypes: {
16
+ page: {
17
+ name: 'page',
18
+ type: { name: 'object', required: true },
19
+ defaultValue: null,
20
+ description: 'The page object.',
21
21
  },
22
- parameters: {
23
- docs: {
24
- description: {
25
- component:
26
- 'Small Welcome Bonus component',
27
- },
28
- page: () => (
29
- <>
30
- <Title />
31
- <Description />
32
- <Primary />
33
- <ArgsTable story={PRIMARY_STORY} />
34
- </>
35
- ),
22
+ },
23
+ parameters: {
24
+ docs: {
25
+ description: {
26
+ component: 'Small Welcome Bonus component',
36
27
  },
28
+ page: () => (
29
+ <>
30
+ <Title />
31
+ <Description />
32
+ <Primary />
33
+ <ArgsTable story={PRIMARY_STORY} />
34
+ </>
35
+ ),
37
36
  },
38
- };
39
-
40
- const Template = (args) => <SmallWelcomeBonus {...args} />;
41
-
42
- export const Default = Template.bind({});
43
- Default.args = {
44
- page: {
45
- translations:{
46
- play_now:'Play Now'
47
- },
48
- extra_fields:{
49
- game_review_summary_operator:{
50
- name:"Chanz Casino",
51
- bonus:{
52
- one_liners:{
53
- main:{
54
- one_liner:"100 kroner gratis + 200% opptil 2000 kr + 300 gratisspinn"
55
- }
56
- }
37
+ },
38
+ };
39
+
40
+ const Template = (args) => <SmallWelcomeBonus {...args} />;
41
+
42
+ export const Default = Template.bind({});
43
+ Default.args = {
44
+ page: {
45
+ extra_fields: {
46
+ game_review_summary_operator: {
47
+ name: 'Chanz Casino',
48
+ bonus: {
49
+ one_liners: {
50
+ main: {
51
+ one_liner: '100 kroner gratis + 200% opptil 2000 kr + 300 gratisspinn',
52
+ },
57
53
  },
58
- logo_url: "chanz390pngb3f8bb64f3-original.png",
59
- status: "active"
60
- }
61
- }
54
+ },
55
+ logo_url: 'chanz390pngb3f8bb64f3-original.png',
56
+ status: 'active',
57
+ },
62
58
  },
63
- };
64
-
59
+ },
60
+ };
@@ -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,10 +4,11 @@
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';
11
12
  import PopupCard from '../../atoms/cards/popup-card';
12
13
 
13
14
  import { setIdleTimeout } from '../../../helpers/popup';
@@ -15,13 +16,14 @@ import { isMobileDevice } from '../../../helpers/mobile-detect';
15
16
 
16
17
  import styles from './popup.module.scss';
17
18
 
18
- const Popup = ({ module, translations, isStorybook = false }) => {
19
+ const Popup = ({ module, isStorybook = false }) => {
19
20
  const modal = useRef(null);
20
21
  const [showModal, setShowModal] = useState(false);
21
22
  const { items } = module.items[0];
22
23
  const shownItems = items?.slice(0, 4) || [];
23
24
  const { style } = module;
24
25
  const tracker = isMobileDevice() ? 'mobPopup' : 'Popup';
26
+ const { translations } = useContext(Context) || {};
25
27
 
26
28
  const close = () => {
27
29
  setShowModal(false);
@@ -93,12 +95,12 @@ const Popup = ({ module, translations, isStorybook = false }) => {
93
95
  <div className={styles.modalContent}>
94
96
  <div className={styles.modalTitle}>
95
97
  <p>{translate(translations, 'claim_bonuses', 'Claim These Exclusive Bonuses')}</p>
96
- <button className={styles.closeIcon} onClick={close}>
98
+ <button className={`${styles.closeIcon} popup-gtm btn-cta`} onClick={close}>
97
99
  <MdClose />
98
100
  </button>
99
101
  </div>
100
102
  {shownItems?.map((item) => (
101
- <PopupCard item={item} translations={translations} tracker={tracker} />
103
+ <PopupCard item={item} tracker={tracker} />
102
104
  ))}
103
105
  </div>
104
106
  </div>
@@ -112,7 +114,6 @@ Popup.propTypes = {
112
114
  items: PropTypes.arrayOf({}),
113
115
  style: PropTypes.string,
114
116
  }).isRequired,
115
- translations: PropTypes.shape({}),
116
117
  isStorybook: PropTypes.bool,
117
118
  };
118
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;