gatsby-matrix-theme 53.18.5 → 53.18.6

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,17 @@
1
+ ## [53.18.6](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/compare/v53.18.5...v53.18.6) (2026-06-02)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * update core version ([2210cad](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/2210cad37d3315a1ea704a7bb16738d67a016823))
7
+ * update info grid test ([0eed55d](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/0eed55d3a2c0253019db56e9ad6f19ca308ef2c3))
8
+ * update theme version, remove unnecessary function ([1825f44](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/1825f443ed04ac6635217efbca21f505588d6d57))
9
+
10
+
11
+ * Merge branch 'master' of gitlab.com:g2m-gentoo/team-floyd/themes/matrix-theme ([64e3ea7](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/64e3ea74c04f4be655e8abab7582b81de8689ec0))
12
+ * Merge branch 'master' of gitlab.com:g2m-gentoo/team-floyd/themes/matrix-theme ([5e64051](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/5e64051f8d2bf09ecda2387b012d453ee3f65330))
13
+ * Merge branch 'master' of gitlab.com:g2m-gentoo/team-floyd/themes/matrix-theme ([43d050e](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/43d050e07b382ba07080becea3ec819252bf948c))
14
+
1
15
  ## [53.18.5](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/compare/v53.18.4...v53.18.5) (2026-06-01)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-matrix-theme",
3
- "version": "53.18.5",
3
+ "version": "53.18.6",
4
4
  "main": "index.js",
5
5
  "description": "Matrix Theme NPM Package",
6
6
  "author": "",
@@ -26,7 +26,7 @@
26
26
  "@react-icons/all-files": "^4.1.0",
27
27
  "@gigmedia/enigma-utils": "^1.20.0",
28
28
  "gatsby": "^5.11.0",
29
- "gatsby-core-theme": "^44.25.0",
29
+ "gatsby-core-theme": "^44.25.2",
30
30
  "gatsby-plugin-sharp": "^5.11.0",
31
31
  "gatsby-plugin-sitemap": "^6.13.1",
32
32
  "gatsby-transformer-sharp": "^5.11.0",
@@ -4,6 +4,7 @@ import { getObjectValue } from 'gatsby-core-theme/src/helpers/getters';
4
4
  import keygen from 'gatsby-core-theme/src/helpers/keygen';
5
5
  import { FaStar } from '@react-icons/all-files/fa/FaStar';
6
6
  import { operatorRatings } from 'gatsby-core-theme/src/constants/ratings-constant';
7
+ import getVolatilityTranslationMeta from 'gatsby-core-theme/src/helpers/volatility';
7
8
  import useTranslate from '~hooks/useTranslate/useTranslate';
8
9
  import styles from './ratings-with-comments.module.scss';
9
10
  import LinearStarRating from '../../../gatsby-core-theme/components/molecules/star-rating/linear-rating';
@@ -29,12 +30,6 @@ const RatingsWithComments = ({
29
30
  const ratings = operatorRatings[typeCheck] || [];
30
31
  const Tag = titleTag || 'h2';
31
32
 
32
- const rangeText = {
33
- 0: useTranslate('range_low', 'Low'),
34
- 1: useTranslate('range_medium', 'Medium'),
35
- 2: useTranslate('range_high', 'High'),
36
- };
37
-
38
33
  const ratingsData = operatorRatings.ratingProperties.some((prop) => item[prop])
39
34
  ? item
40
35
  : item?.bonus || item;
@@ -64,7 +59,8 @@ const RatingsWithComments = ({
64
59
  if (component) {
65
60
  valueDisplayed = component || '-';
66
61
  } else if (fieldValue.includes('volatility')) {
67
- valueDisplayed = rangeText[getObjectValue(ratingsData, fieldValue)] || '-';
62
+ const { key, displayValue } = getVolatilityTranslationMeta(value);
63
+ valueDisplayed = key ? useTranslate(key, displayValue) : displayValue;
68
64
  } else {
69
65
  valueDisplayed = value || '-';
70
66
  }
@@ -1,6 +1,7 @@
1
1
  /* eslint-disable array-callback-return */
2
2
  /* eslint-disable no-nested-ternary */
3
3
  import React from 'react';
4
+ import getVolatilityTranslationMeta from 'gatsby-core-theme/src/helpers/volatility';
4
5
  import PrettyLink from '~atoms/pretty-link';
5
6
  import { TrackingKeys } from '~constants/tracking-api'
6
7
  import Tooltip from '../components/atoms/tooltip';
@@ -85,12 +86,13 @@ export const formatGameDate = (value) => {
85
86
  }, '');
86
87
  };
87
88
  export const generateVolatility = (value) => {
88
- if (value === null) return useTranslate('low', 'Low');
89
- return value === 0
90
- ? useTranslate('low', 'Low')
91
- : value === 1
92
- ? useTranslate('medium', 'Medium')
93
- : useTranslate('high', 'High');
89
+ const { key, displayValue } = getVolatilityTranslationMeta(value);
90
+
91
+ if (!key) {
92
+ return displayValue;
93
+ }
94
+
95
+ return useTranslate(key, displayValue);
94
96
  };
95
97
  export const formatDate = (value) => value?.slice(0, 4);
96
98
  export const generateYesorNo = (value) =>
@@ -1,6 +1,7 @@
1
1
  /* eslint-disable react/jsx-no-target-blank */
2
2
  import React from 'react';
3
3
  import { render, fireEvent, waitFor } from '@testing-library/react';
4
+ import getVolatilityTranslationMeta from 'gatsby-core-theme/src/helpers/volatility';
4
5
  import getOperatorData from '../../tests/factories/pages/operator.factory';
5
6
  import { defaultInfoGrid } from '../constants/info-grid';
6
7
  import {
@@ -88,7 +89,8 @@ describe('Info Grid helper component', () => {
88
89
  ).toBe('South Africa Rand');
89
90
  });
90
91
  test('Generate Volatility for grid item', () => {
91
- expect(generateVolatility(data.relation.volatility)).toBe('Medium');
92
+ const { displayValue } = getVolatilityTranslationMeta(data.relation.volatility);
93
+ expect(generateVolatility(data.relation.volatility)).toBe(displayValue);
92
94
  });
93
95
  test('format date for grid item', () => {
94
96
  expect(formatDate(data.relation.founded)).toBe('2012');