@griddo/cx 1.75.6 → 1.75.8
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/gatsby-browser.js +8 -4
- package/gatsby-ssr.js +9 -4
- package/package.json +3 -3
- package/src/components/template.js +16 -8
package/gatsby-browser.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
/* eslint-disable node/no-extraneous-require */
|
|
1
2
|
/* eslint-disable node/no-missing-require */
|
|
2
|
-
|
|
3
|
+
const React = require('react');
|
|
3
4
|
const { browser } = require('components');
|
|
5
|
+
const { SessionProvider } = require('@griddo/core');
|
|
4
6
|
|
|
5
7
|
exports.disableCorePrefetching = () => {
|
|
6
8
|
if (browser.disableCorePrefetching) {
|
|
@@ -99,9 +101,11 @@ exports.wrapPageElement = props => {
|
|
|
99
101
|
};
|
|
100
102
|
|
|
101
103
|
exports.wrapRootElement = props => {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
104
|
+
return (
|
|
105
|
+
<SessionProvider>
|
|
106
|
+
{browser.wrapRootElement ? browser.wrapRootElement(props) : props.element}
|
|
107
|
+
</SessionProvider>
|
|
108
|
+
);
|
|
105
109
|
};
|
|
106
110
|
|
|
107
111
|
exports.onRouteUpdate = props => {
|
package/gatsby-ssr.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
/* eslint-disable node/no-extraneous-import */
|
|
1
2
|
/* eslint-disable node/no-missing-require */
|
|
2
|
-
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { ssr } from 'components';
|
|
5
|
+
import { SessionProvider } from '@griddo/core';
|
|
3
6
|
|
|
4
7
|
export const wrapPageElement = ({ props }) => {
|
|
5
8
|
if (ssr.wrapPageElement) {
|
|
@@ -32,7 +35,9 @@ export const replaceRenderer = props => {
|
|
|
32
35
|
};
|
|
33
36
|
|
|
34
37
|
export const wrapRootElement = props => {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
return (
|
|
39
|
+
<SessionProvider>
|
|
40
|
+
{ssr.wrapRootElement ? ssr.wrapRootElement(props) : props.element}
|
|
41
|
+
</SessionProvider>
|
|
42
|
+
);
|
|
38
43
|
};
|
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.75.
|
|
4
|
+
"version": "1.75.8",
|
|
5
5
|
"authors": [
|
|
6
6
|
"Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
|
|
7
7
|
"Carlos Torres <carlos.torres@secuoyas.com>",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"react-helmet": "^6.0.0"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@griddo/eslint-config-back": "^1.75.
|
|
68
|
+
"@griddo/eslint-config-back": "^1.75.8",
|
|
69
69
|
"eslint": "^7.5.0",
|
|
70
70
|
"eslint-plugin-node": "^11.1.0",
|
|
71
71
|
"eslint-plugin-react": "7.14.3",
|
|
@@ -97,5 +97,5 @@
|
|
|
97
97
|
"publishConfig": {
|
|
98
98
|
"access": "public"
|
|
99
99
|
},
|
|
100
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "172d6f9cd5092a354f09cdcb60ec1159e3469920"
|
|
101
101
|
}
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
/* eslint-disable node/no-extraneous-import */
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import { Link, navigate } from
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import { Link, navigate } from 'gatsby';
|
|
4
|
+
import {
|
|
5
|
+
generateAutomaticDimensions,
|
|
6
|
+
components,
|
|
7
|
+
templates,
|
|
8
|
+
SiteProvider,
|
|
9
|
+
} from 'components';
|
|
10
|
+
import { Page as RenderGriddoPage } from '@griddo/core';
|
|
7
11
|
|
|
8
|
-
import {
|
|
12
|
+
import { composeAnalytics } from '../utils/dataLayer';
|
|
13
|
+
import Seo from './seo';
|
|
9
14
|
|
|
10
|
-
export default
|
|
15
|
+
export default data => {
|
|
11
16
|
const {
|
|
12
17
|
page: content,
|
|
13
18
|
locale,
|
|
@@ -32,9 +37,12 @@ export default (data) => {
|
|
|
32
37
|
templates,
|
|
33
38
|
};
|
|
34
39
|
|
|
35
|
-
const mappedTheme = theme ||
|
|
40
|
+
const mappedTheme = theme || 'default-theme';
|
|
36
41
|
|
|
37
|
-
const { analyticsScript, analyticsDimensions } = composeAnalytics(
|
|
42
|
+
const { analyticsScript, analyticsDimensions } = composeAnalytics(
|
|
43
|
+
data,
|
|
44
|
+
generateAutomaticDimensions
|
|
45
|
+
);
|
|
38
46
|
|
|
39
47
|
if (!content.dimensions) content.dimensions = [];
|
|
40
48
|
content.dimensions.values = analyticsDimensions;
|