gatsby-core-theme 41.1.13 → 41.1.14

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,13 @@
1
+ ## [41.1.14](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v41.1.13...v41.1.14) (2024-12-23)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * add placeholder for anchor ([1982603](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/19826038e2f94a1664ef01e11238c422a7a1fc76))
7
+
8
+
9
+ * Merge branch 'TM-5018-anchor-placeholder' into 'master' ([328a58b](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/328a58b9e15063c8b0adf0c15dd4578369d8051e))
10
+
1
11
  ## [41.1.13](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v41.1.12...v41.1.13) (2024-12-17)
2
12
 
3
13
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-core-theme",
3
- "version": "41.1.13",
3
+ "version": "41.1.14",
4
4
  "description": "Gatsby Theme NPM Package",
5
5
  "author": "",
6
6
  "license": "ISC",
@@ -11,6 +11,7 @@ import { IoIosArrowForward } from "@react-icons/all-files/io/IoIosArrowForward";
11
11
  import isSticky from "~hooks/stickyOnScroll";
12
12
  import keygen from "~helpers/keygen";
13
13
  import { anchorLink, removeSymbols } from "~helpers/strings";
14
+ import { generatePlaceholderString } from "~helpers/generators";
14
15
 
15
16
  import useTranslate from "~hooks/useTranslate/useTranslate";
16
17
  import styles from "./anchor.module.scss";
@@ -27,10 +28,11 @@ function Anchor({
27
28
  buttonScroll = 200,
28
29
  leftButtonIcon = <IoIosArrowBack />,
29
30
  rightButtonIcon = <IoIosArrowForward />,
31
+ page
30
32
  }) {
31
33
  const [scrollX, setScrollX] = useState(0);
32
34
  const [scrollEnd, setScrollEnd] = useState(false);
33
-
35
+
34
36
  const itemsRef = useRef([]);
35
37
  const anchorContainerRef = useRef(null);
36
38
  const anchorListRef = useRef(null);
@@ -126,7 +128,7 @@ function Anchor({
126
128
  ref={(el) => (itemsRef.current[index] = el)}
127
129
  href={`#${item?.id && item.id}`}
128
130
  >
129
- {useTranslate(item.slug, item.label)}
131
+ {generatePlaceholderString(useTranslate(item.slug, item.label),null, page?.relation)}
130
132
  {icon}
131
133
  </a>
132
134
  </li>
@@ -200,6 +202,9 @@ Anchor.propTypes = {
200
202
  rightButtonIcon: PropTypes.shape({}),
201
203
  minCharactersForButtons: PropTypes.number,
202
204
  setShowButtons: PropTypes.bool,
205
+ page: PropTypes.shape({
206
+ relation:PropTypes.shape({})
207
+ })
203
208
  };
204
209
 
205
210
  export default Anchor;
@@ -1,3 +1,4 @@
1
+ /* eslint-disable react-hooks/rules-of-hooks */
1
2
  /* eslint-disable import/no-extraneous-dependencies */
2
3
  /* eslint-disable no-unused-expressions */
3
4
  /* eslint-disable prefer-destructuring */
@@ -10,9 +11,11 @@ import ScollX from 'gatsby-core-theme/src/hooks/scroll-x';
10
11
  import keygen from '~helpers/keygen';
11
12
  import { anchorLink, removeSymbols } from '~helpers/strings';
12
13
  import useTranslate from '~hooks/useTranslate/useTranslate';
14
+ import { generatePlaceholderString } from "~helpers/generators";
15
+
13
16
  import styles from './template-two.module.scss';
14
17
 
15
- function Anchor({ module: { items }, icon = null, showTitle = true, exclOperator = false }) {
18
+ function Anchor({ module: { items }, icon = null, showTitle = true, exclOperator = false, page }) {
16
19
  const itemsRef = useRef([]);
17
20
  const anchorContainerRef = useRef(null);
18
21
  const anchorListRef = useRef(null);
@@ -49,7 +52,7 @@ function Anchor({ module: { items }, icon = null, showTitle = true, exclOperator
49
52
  ref={(el) => (itemsRef.current[index] = el)}
50
53
  href={`#${item?.id && item.id}`}
51
54
  >
52
- {useTranslate(item.slug, item.label)}
55
+ {generatePlaceholderString(useTranslate(item.slug, item.label), null, page?.relation)}
53
56
  {icon}
54
57
  </a>
55
58
  </li>
@@ -70,10 +73,12 @@ Anchor.propTypes = {
70
73
  })
71
74
  ),
72
75
  }).isRequired,
73
- headerOffset: PropTypes.number,
74
76
  styles: PropTypes.shape({}),
75
77
  icon: PropTypes.element,
76
78
  showTitle: PropTypes.string,
79
+ page: PropTypes.shape({
80
+ relation: PropTypes.shape({})
81
+ })
77
82
  };
78
83
 
79
84
  export default Anchor;