gatsby-core-theme 22.0.10 → 22.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
+ ## [22.0.11](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v22.0.10...v22.0.11) (2023-06-14)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * add translation in splash screen for casinos ([dbe528e](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/dbe528ea9fd3367c9f1a27741892a750f3ee9eb6))
7
+ * added fix for breadcrumbs ([7b77890](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/7b77890bdd3594ce47b0d5ed40e949eb52cc2ff9))
8
+
9
+
10
+ * Merge branch 'splashscreen' into 'master' ([ce938dc](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/ce938dca8e8226b6bf9ef2f22a24a46025d1ecf7))
11
+
1
12
  ## [22.0.10](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v22.0.9...v22.0.10) (2023-06-14)
2
13
 
3
14
 
@@ -396,6 +396,8 @@ exports.createPages = async ({ actions: { createPage } }, themeOptions) => {
396
396
  ? generateTrackerLink(operator, key, false, pageTemplate).toLowerCase().replace(' ', '_')
397
397
  : null
398
398
  );
399
+ const marketOperator = operator.market.match(/_(\w+)/)[1];
400
+
399
401
  tracker.forEach((trackerPath) => {
400
402
  // Create splash page
401
403
  if (trackerPath) {
@@ -405,6 +407,7 @@ exports.createPages = async ({ actions: { createPage } }, themeOptions) => {
405
407
  title: 'Tracker',
406
408
  relation_type: 'page',
407
409
  language: languageKey,
410
+ translations: processed.relations.translations[marketOperator],
408
411
  path: trackerPath,
409
412
  meta_robots: ['noindex', 'nofollow'],
410
413
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-core-theme",
3
- "version": "22.0.10",
3
+ "version": "22.0.11",
4
4
  "description": "Gatsby Theme NPM Package",
5
5
  "main": "index.js",
6
6
  "GATSBY_RECAPTCHA_SITEKEY": "6LfoyvMUAAAAAO4nl_MQnqHb4XdHxEiu5cXgIqeB",
@@ -14,7 +14,7 @@ function Breadcrumbs({ page, separator = <span> / </span>, markets }) {
14
14
 
15
15
  if (
16
16
  page.path ===
17
- `${activeMarket && activeMarket.path_prefix ? `${activeMarket.path_prefix}/` : '/'}`
17
+ `${activeMarket && activeMarket.path_prefix ? `${activeMarket.path_prefix}` : '/'}`
18
18
  ) {
19
19
  return <></>;
20
20
  }
@@ -1,8 +1,8 @@
1
- import React, { useEffect } from 'react';
1
+ import React, { useEffect, useContext } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import Button from '~atoms/button';
4
4
  import LazyImage from '~hooks/lazy-image';
5
- import { prettyTracker, imagePrettyUrl, getAltText } from '~helpers/getters';
5
+ import { prettyTracker, imagePrettyUrl, getAltText, translate } from '~helpers/getters';
6
6
  import { generateTrackerLink } from '~helpers/generators';
7
7
  import styles from './tracker.module.scss';
8
8
 
@@ -23,7 +23,7 @@ const Tracker = ({
23
23
  operatorLogoHeight = '80',
24
24
  }) => {
25
25
  const { operator, page } = pageContext;
26
-
26
+ const translations = page?.translations;
27
27
  const trackerLinks = operator ? Object.keys(operator.links) : [];
28
28
 
29
29
  let tracker = '';
@@ -97,7 +97,10 @@ const Tracker = ({
97
97
  className={`${styles.mainText || ''} ${
98
98
  operatorLogo && (styles.mainTextWithlogo || '')
99
99
  }`}
100
- >{`${mainText.replace('[operator_name]', operator.name)}`}</p>
100
+ >{`${translate(translations, 'splash_screen_main_text', mainText).replace(
101
+ '[operator_name]',
102
+ operator.name
103
+ )}`}</p>
101
104
  {operatorLogo && (
102
105
  <LazyImage
103
106
  src={imagePrettyUrl(
@@ -119,12 +122,14 @@ const Tracker = ({
119
122
  <div
120
123
  className={styles.redirectText || ''}
121
124
  // eslint-disable-next-line react/no-danger
122
- dangerouslySetInnerHTML={{ __html: redirectText }}
125
+ dangerouslySetInnerHTML={{
126
+ __html: translate(translations, 'splash_screen_redirect_text', redirectText),
127
+ }}
123
128
  />
124
129
  )}
125
130
  <Button
126
131
  onClick={(e) => manualRedirect(e)}
127
- btnText={btnText}
132
+ btnText={translate(translations, 'splash_screen_button', btnText)}
128
133
  primaryColor
129
134
  to={prettyTracker(operator, 'main', false, page?.template)}
130
135
  targetBlank={false}