gatsby-core-theme 30.0.23 → 30.0.24
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,10 @@
|
|
|
1
|
+
## [30.0.24](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v30.0.23...v30.0.24) (2023-11-23)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* tracker ([3961809](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/3961809b1e20695eb8e02b788c77d45c40eb2759))
|
|
7
|
+
|
|
1
8
|
## [30.0.23](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v30.0.22...v30.0.23) (2023-11-22)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@ import React, { useEffect } from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import Button from '~atoms/button/button';
|
|
4
4
|
import LazyImage from '~hooks/lazy-image';
|
|
5
|
-
import { imagePrettyUrl, getAltText, translate
|
|
5
|
+
import { imagePrettyUrl, getAltText, translate } from '~helpers/getters';
|
|
6
6
|
import { generateTrackerLink } from '~helpers/generators';
|
|
7
7
|
import styles from './tracker.module.scss';
|
|
8
8
|
import { getAffiliateLink } from '~helpers/tracker';
|
|
@@ -28,6 +28,8 @@ const Tracker = ({
|
|
|
28
28
|
const translations = page?.translations;
|
|
29
29
|
const trackerLinks = operator ? Object.keys(operator.links) : [];
|
|
30
30
|
|
|
31
|
+
const stripTrailingSlash = (str) => (str.endsWith('/') ? str.slice(0, -1) : str);
|
|
32
|
+
|
|
31
33
|
let tracker = '';
|
|
32
34
|
for (let i = 0; i < trackerLinks.length; i += 1) {
|
|
33
35
|
const trackerLink = trackerLinks[i].toLowerCase().replace(' ', '_');
|
|
@@ -2,7 +2,7 @@ import React, { useEffect } from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import Button from '~atoms/button/button';
|
|
4
4
|
import LazyImage from '~hooks/lazy-image';
|
|
5
|
-
import {
|
|
5
|
+
import { imagePrettyUrl, getAltText, translate } from '~helpers/getters';
|
|
6
6
|
import { generateTrackerLink } from '~helpers/generators';
|
|
7
7
|
import styles from './tracker.module.scss';
|
|
8
8
|
|
|
@@ -26,6 +26,8 @@ const Tracker = ({
|
|
|
26
26
|
const translations = page?.translations;
|
|
27
27
|
const trackerLinks = operator ? Object.keys(operator.links) : [];
|
|
28
28
|
|
|
29
|
+
const stripTrailingSlash = (str) => (str.endsWith('/') ? str.slice(0, -1) : str);
|
|
30
|
+
|
|
29
31
|
let tracker = '';
|
|
30
32
|
for (let i = 0; i < trackerLinks.length; i += 1) {
|
|
31
33
|
const trackerLink = trackerLinks[i].toLowerCase().replace(' ', '_');
|
package/src/helpers/getters.mjs
CHANGED
|
@@ -176,12 +176,6 @@ export function getParameterCaseInsensitive(object, key) {
|
|
|
176
176
|
];
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
-
export function stripTrailingSlash(str) {
|
|
180
|
-
return str.endsWith('/') ?
|
|
181
|
-
str.slice(0, -1) :
|
|
182
|
-
str;
|
|
183
|
-
};
|
|
184
|
-
|
|
185
179
|
export function prettyTracker(
|
|
186
180
|
operator,
|
|
187
181
|
trackerType = 'main',
|