gatsby-core-theme 17.0.0 → 17.0.2

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,22 @@
1
+ ## [17.0.2](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v17.0.1...v17.0.2) (2022-12-06)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * add validation ([7aed122](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/7aed1224ca6970ab2483b1b4f30f2c713cf7e49a))
7
+ * oeprator name in splash screen and cards v2 ([3241a41](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/3241a418904e6d4e2e90a4b8feb92c1470882d80))
8
+ * remove rerender the comopenent during the srcoll ([51d6ead](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/51d6eada8d33dd5aa0b6e92677755b2b8c2db1d9))
9
+
10
+
11
+ * Merge branch 'tm-3205-anchor' into 'master' ([b714116](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/b71411609cac46dc50b743356d8b842a52df1d53))
12
+
13
+ ## [17.0.1](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v17.0.0...v17.0.1) (2022-12-01)
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * added payment method standardized logo for cards ([82cc06d](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/82cc06dfc8a167040fe94c789461dbba615ee6d1))
19
+
1
20
  # [17.0.0](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v16.0.0...v17.0.0) (2022-11-30)
2
21
 
3
22
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-core-theme",
3
- "version": "17.0.0",
3
+ "version": "17.0.2",
4
4
  "description": "Gatsby Theme NPM Package",
5
5
  "main": "index.js",
6
6
  "GATSBY_RECAPTCHA_SITEKEY": "6LfoyvMUAAAAAO4nl_MQnqHb4XdHxEiu5cXgIqeB",
@@ -11,7 +11,6 @@ import keygen from '~helpers/keygen';
11
11
  import { anchorLink, removeSymbols } from '~helpers/strings';
12
12
  import styles from './anchor.module.scss';
13
13
  import ScollX from '../../../hooks/scroll-x';
14
- import isSticky from '~hooks/stickyOnScroll';
15
14
 
16
15
  function Anchor({
17
16
  module: { items },
@@ -24,12 +23,12 @@ function Anchor({
24
23
  exclOperator = false,
25
24
  isScrollable = true,
26
25
  }) {
27
- const [offsetTop, setOffsetTop] = useState(null);
26
+ const [anchorSticky, setAnchorSticky] = useState(false);
28
27
  const itemsRef = useRef([]);
29
28
  const anchorContainerRef = useRef(null);
30
29
  const anchorListRef = useRef(null);
31
30
  const progressBar = useRef(null);
32
- const sticky = isFixed && isSticky(offsetTop);
31
+ const sticky = isFixed && anchorSticky;
33
32
  const { translations } = useContext(Context) || {};
34
33
  const anchorList = items.map((anchor) => ({
35
34
  id: `${anchor.label && removeSymbols(anchorLink(anchor?.label?.toLowerCase().trim()))}`,
@@ -57,8 +56,8 @@ function Anchor({
57
56
  }
58
57
 
59
58
  const setActiveAnchor = () => {
60
- anchorContainerRef.current && setOffsetTop(anchorContainerRef.current.offsetTop);
61
59
  const { innerHeight, scrollY } = window;
60
+ setAnchorSticky(window.scrollY > anchorContainerRef?.current?.offsetTop);
62
61
 
63
62
  // progress scroll bar
64
63
  const scrollHeight = document.querySelector('body').scrollHeight;
@@ -103,7 +103,10 @@ const Tracker = ({
103
103
  <LazyImage alt="Site logo" src={logo} />
104
104
  <p
105
105
  className={`${styles.mainText} ${operatorLogo && styles.mainTextWithlogo}`}
106
- >{`${mainText.replace('[operator_name]', operator.name)}`}</p>
106
+ >{`${mainText.replace(
107
+ '[operator_name]',
108
+ operator.bonus.operator_name || operator.name
109
+ )}`}</p>
107
110
  {operatorLogo && (
108
111
  <LazyImage
109
112
  src={imagePrettyUrl(
@@ -111,7 +114,7 @@ const Tracker = ({
111
114
  operatorLogoWidth,
112
115
  operatorLogoHeight
113
116
  )}
114
- alt={getAltText(imageObject, operator?.name)}
117
+ alt={getAltText(imageObject, operator.bonus.operator_name || operator.name)}
115
118
  loading="eager"
116
119
  width={operatorLogoWidth}
117
120
  height={operatorLogoHeight}
@@ -161,6 +164,9 @@ Tracker.propTypes = {
161
164
  operatorLogoHeight: PropTypes.string,
162
165
  pageContext: PropTypes.shape({
163
166
  operator: PropTypes.shape({
167
+ bonus: PropTypes.shape({
168
+ operator_name: PropTypes.string,
169
+ }),
164
170
  name: PropTypes.string,
165
171
  standardised_logo_url_object: PropTypes.shape({}),
166
172
  logo_url_object: PropTypes.shape({}),
@@ -69,7 +69,13 @@ export const pickRelationKeys = {
69
69
  'thumbnail_filename_object',
70
70
  ],
71
71
  software_provider: ['logo_object', 'logo', 'games_count', 'name', 'standardised_logo_url_object'],
72
- payment_method: ['logo_object', 'logo', 'name', 'rating', 'standardised_logo_url_object'],
72
+ payment_method: [
73
+ 'logo_filename_object',
74
+ 'logo_filename',
75
+ 'name',
76
+ 'rating',
77
+ 'standardised_logo_filename_object',
78
+ ],
73
79
  };
74
80
 
75
81
  export const pickHTMLSitemapPageKeys = ['title', 'path', 'template_id'];
@@ -97,6 +97,8 @@ export function removeTags(str) {
97
97
 
98
98
  export function removeCurrentPage(list, id) {
99
99
  const index = list.findIndex((el) => el.id === id);
100
- list.splice(index, 1);
100
+ if (index !== -1) {
101
+ list.splice(index, 1);
102
+ }
101
103
  return list;
102
104
  }