gatsby-core-theme 22.0.13 → 22.0.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
|
+
## [22.0.14](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v22.0.13...v22.0.14) (2023-06-19)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* add realtion data for the preview page ([f77cb00](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/f77cb00b528ca23eb596e86f97b7845aa77b73ce))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
* Merge branch 'tm-3451-cards' into 'master' ([06265c9](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/06265c9a0a83f2bf9739370ff06659fe7ff5adbc))
|
|
10
|
+
|
|
1
11
|
## [22.0.13](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v22.0.12...v22.0.13) (2023-06-16)
|
|
2
12
|
|
|
3
13
|
|
package/package.json
CHANGED
|
@@ -281,7 +281,15 @@ export default {
|
|
|
281
281
|
updatePlaceholders(page, data);
|
|
282
282
|
|
|
283
283
|
// set page relation
|
|
284
|
-
processRelations(
|
|
284
|
+
processRelations(
|
|
285
|
+
page,
|
|
286
|
+
pageType,
|
|
287
|
+
transformedPages,
|
|
288
|
+
market,
|
|
289
|
+
data,
|
|
290
|
+
index,
|
|
291
|
+
pageType === 'preview'
|
|
292
|
+
);
|
|
285
293
|
|
|
286
294
|
// add author object to page
|
|
287
295
|
if (page.author_id !== null && data.authors[page.author_id]) {
|
|
@@ -1,11 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable no-prototype-builtins */
|
|
2
|
+
/* eslint-disable camelcase */
|
|
3
|
+
/* eslint-disable no-unused-expressions */
|
|
4
|
+
/* eslint-disable import/prefer-default-export */
|
|
5
|
+
/* eslint-disable no-shadow */
|
|
6
|
+
export const processRelations = (
|
|
7
|
+
page,
|
|
8
|
+
pageType,
|
|
9
|
+
transformedPages,
|
|
10
|
+
market,
|
|
11
|
+
data,
|
|
12
|
+
index,
|
|
13
|
+
isPreview
|
|
14
|
+
) => {
|
|
2
15
|
if (page.relation_type !== 'page' && page.relation_id) {
|
|
3
16
|
const hasRelation =
|
|
4
17
|
data.relations[page.relation_type] &&
|
|
5
18
|
data.relations[page.relation_type].hasOwnProperty(page.relation_id);
|
|
6
|
-
transformedPages[market][page.relation_type][index].relation =
|
|
7
|
-
? data.relations[page.relation_type][page.relation_id]
|
|
8
|
-
: null;
|
|
19
|
+
transformedPages[market][isPreview ? 'preview' : page.relation_type][index].relation =
|
|
20
|
+
hasRelation ? data.relations[page.relation_type][page.relation_id] : null;
|
|
9
21
|
switch (page.relation_type) {
|
|
10
22
|
// Add path for payment page from payment method
|
|
11
23
|
case 'operator':
|