gatsby-core-theme 18.0.19 → 18.0.21

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,27 @@
1
+ ## [18.0.21](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v18.0.20...v18.0.21) (2023-03-08)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * fix a small issue ([d5c9ad8](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/d5c9ad889903964d3cfa7919a4a014720f62732b))
7
+ * optinmnstr ([026e823](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/026e823ebd1dec2a7fbd497edc012c1ae5166148))
8
+ * optinmnstr ([6d126d2](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/6d126d2d600817dde635d16a2604b0b04b30dd39))
9
+ * show the button for icon mode and add translatio ([b121d58](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/b121d586d9c4ea4a38ab8335134ad638d57d3893))
10
+
11
+
12
+ * Merge branch 'tm-3342-spotlight-cta' into 'master' ([eee690b](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/eee690b8bb1161929409000393c15739d93403f4))
13
+ * Merge branch 'master' of git.ilcd.rocks:team-floyd/themes/gatsby-themes ([bcf085e](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/bcf085eaef04fc4b17d600cf1ce5d060aa43709f))
14
+
15
+ ## [18.0.20](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v18.0.19...v18.0.20) (2023-03-06)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * add schedule data ([051ceaa](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/051ceaab4d4a853b96aaf8010fee4b685032ff23))
21
+
22
+
23
+ * Merge branch 'tm-3339-add-aschedule' into 'master' ([e7a53c1](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/e7a53c18b648ace2a090cc575beab32cd9c3f660))
24
+
1
25
  ## [18.0.19](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v18.0.18...v18.0.19) (2023-03-01)
2
26
 
3
27
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-core-theme",
3
- "version": "18.0.19",
3
+ "version": "18.0.21",
4
4
  "description": "Gatsby Theme NPM Package",
5
5
  "main": "index.js",
6
6
  "GATSBY_RECAPTCHA_SITEKEY": "6LfoyvMUAAAAAO4nl_MQnqHb4XdHxEiu5cXgIqeB",
@@ -2,18 +2,21 @@
2
2
  /* eslint-disable jsx-a11y/label-has-associated-control */
3
3
  /* eslint-disable react/no-danger */
4
4
  /* eslint-disable camelcase */
5
- import React from 'react';
5
+ import React, { useContext } from 'react';
6
6
  import PropTypes from 'prop-types';
7
7
  import Button from '~atoms/button';
8
8
  import imgSize from '~constants/spotlight-image-dimensions.js';
9
9
  import LazyImage from '~hooks/lazy-image';
10
10
  import keygen from '~helpers/keygen';
11
- import { imagePrettyUrl, getImageFilename, getAltText } from '~helpers/getters';
11
+ import { imagePrettyUrl, getImageFilename, getAltText, translate } from '~helpers/getters';
12
12
  import Link from '~hooks/link';
13
+ import { Context } from '~context/MainProvider.js';
13
14
  import styles from './spotlights.module.scss';
14
15
 
15
16
  const Spotlights = ({ module, themeStyles = {} }) => {
16
17
  const { show_read_more, read_more_text, items, mode } = module;
18
+ const { translations } = useContext(Context) || {};
19
+
17
20
  const content = (item) => {
18
21
  const img = mode === 'icon' ? item.icon : item.image;
19
22
 
@@ -81,7 +84,7 @@ const Spotlights = ({ module, themeStyles = {} }) => {
81
84
  </Link>
82
85
  ))}
83
86
 
84
- {mode === 'image_text' &&
87
+ {(mode === 'image_text' || mode === 'icon') &&
85
88
  (item.link && item.link.value ? (
86
89
  <>
87
90
  {item?.text && <div dangerouslySetInnerHTML={{ __html: item.text }} />}
@@ -93,7 +96,11 @@ const Spotlights = ({ module, themeStyles = {} }) => {
93
96
  invertColors
94
97
  primaryColor={false}
95
98
  gtmClass="spotlights-gtm"
96
- btnText={item.link_text ? item.link_text : 'Read More'}
99
+ btnText={
100
+ item.link_text
101
+ ? item.link_text
102
+ : translate(translations, 'read_more', 'Read More')
103
+ }
97
104
  />
98
105
  </>
99
106
  ) : (
@@ -119,7 +119,7 @@ export function addSportsDataToPage(sportsData, page, themeType) {
119
119
  }
120
120
  // rage-seo pages data
121
121
  if (themeType === 'rage_seo' || themeType === 'sports') {
122
- if (pageType === 'homepage') {
122
+ if (pageType === 'homepage' || pageType === 'default') {
123
123
  relation.schedule = sportsData.schedule.soccer || null;
124
124
  relation.featured_events = sportsData.featured_events.soccer || null;
125
125
  relation.showcased_events = sportsData.showcased_events.soccer || null;