@griddo/cx 1.66.12 → 1.67.1
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@griddo/cx",
|
|
3
3
|
"description": "Griddo SSG based on Gatsby",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.67.1",
|
|
5
5
|
"authors": [
|
|
6
6
|
"Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
|
|
7
7
|
"Carlos Torres <carlos.torres@secuoyas.com>",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"react-helmet": "^6.0.0"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@griddo/eslint-config-back": "^1.
|
|
67
|
+
"@griddo/eslint-config-back": "^1.67.1",
|
|
68
68
|
"eslint": "^7.5.0",
|
|
69
69
|
"eslint-plugin-node": "^11.1.0",
|
|
70
70
|
"eslint-plugin-react": "7.14.3",
|
|
@@ -96,5 +96,5 @@
|
|
|
96
96
|
"publishConfig": {
|
|
97
97
|
"access": "public"
|
|
98
98
|
},
|
|
99
|
-
"gitHead": "
|
|
99
|
+
"gitHead": "03c2d30998ed330b63a484e3e6117be3ccea8770"
|
|
100
100
|
}
|
package/src/components/seo.js
CHANGED
|
@@ -107,7 +107,10 @@ export default function SEO(props) {
|
|
|
107
107
|
)}
|
|
108
108
|
|
|
109
109
|
{/* Data Layer */}
|
|
110
|
-
|
|
110
|
+
{/* Solo cuando se ejecuta en el navegador */}
|
|
111
|
+
{
|
|
112
|
+
typeof (window) !== 'undefined' && <script>{`const newDataLayer = ${analyticsDimensions};newDataLayer && window.dataLayer && window.dataLayer.push(newDataLayer);`}</script>
|
|
113
|
+
}
|
|
111
114
|
</Helmet>
|
|
112
115
|
</>
|
|
113
116
|
);
|
|
@@ -44,7 +44,7 @@ class DistributorService {
|
|
|
44
44
|
try {
|
|
45
45
|
const { template } = page;
|
|
46
46
|
|
|
47
|
-
const
|
|
47
|
+
const checkDistributors = async (template, level = 1) => {
|
|
48
48
|
if (!template || typeof (template) !== 'object') return;
|
|
49
49
|
if (!JSON.stringify(template).includes('"hasDistributorData":true')) return;
|
|
50
50
|
for (let key in template) {
|
|
@@ -58,12 +58,12 @@ class DistributorService {
|
|
|
58
58
|
cached
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
|
-
await
|
|
61
|
+
await checkDistributors(component, level + 1);
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
64
|
|
|
65
65
|
const getDistributors = async (template) => {
|
|
66
|
-
await
|
|
66
|
+
await checkDistributors([template]); // ==> En array para que también revise la propia template como objeto.
|
|
67
67
|
return template;
|
|
68
68
|
};
|
|
69
69
|
|