@sentecacommerce-theme/lib 0.13.5 → 0.13.6
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.
@@ -68,8 +68,11 @@ function ProductProvider(param) {
|
|
68
68
|
selectedVariant,
|
69
69
|
]);
|
70
70
|
var seoData = _react.default.useMemo(function() {
|
71
|
+
var ref, ref39, ref40;
|
72
|
+
var title = (0, _).getTranslatableField(selectedVariant === null || selectedVariant === void 0 ? void 0 : selectedVariant.metaTitle) || (0, _).getTranslatableField(product === null || product === void 0 ? void 0 : product.metaTitle);
|
73
|
+
var brandName = product === null || product === void 0 ? void 0 : (ref = product.brands) === null || ref === void 0 ? void 0 : (ref39 = ref[0]) === null || ref39 === void 0 ? void 0 : (ref40 = ref39.resource) === null || ref40 === void 0 ? void 0 : ref40.name;
|
71
74
|
var seoObj = {
|
72
|
-
title:
|
75
|
+
title: includeBrandInName && brandName ? "".concat(brandName, " ").concat(title) : title,
|
73
76
|
description: (0, _).getTranslatableField(selectedVariant === null || selectedVariant === void 0 ? void 0 : selectedVariant.metaDescription) || (0, _).getTranslatableField(product === null || product === void 0 ? void 0 : product.metaDescription),
|
74
77
|
keywords: (0, _).getTranslatableField(selectedVariant === null || selectedVariant === void 0 ? void 0 : selectedVariant.metaKeywords) || (0, _).getTranslatableField(product === null || product === void 0 ? void 0 : product.metaKeywords)
|
75
78
|
};
|
@@ -56,8 +56,11 @@ export function ProductProvider(param) {
|
|
56
56
|
selectedVariant,
|
57
57
|
]);
|
58
58
|
var seoData = React.useMemo(function() {
|
59
|
+
var ref, ref39, ref40;
|
60
|
+
var title = getTranslatableField(selectedVariant === null || selectedVariant === void 0 ? void 0 : selectedVariant.metaTitle) || getTranslatableField(product === null || product === void 0 ? void 0 : product.metaTitle);
|
61
|
+
var brandName = product === null || product === void 0 ? void 0 : (ref = product.brands) === null || ref === void 0 ? void 0 : (ref39 = ref[0]) === null || ref39 === void 0 ? void 0 : (ref40 = ref39.resource) === null || ref40 === void 0 ? void 0 : ref40.name;
|
59
62
|
var seoObj = {
|
60
|
-
title:
|
63
|
+
title: includeBrandInName && brandName ? "".concat(brandName, " ").concat(title) : title,
|
61
64
|
description: getTranslatableField(selectedVariant === null || selectedVariant === void 0 ? void 0 : selectedVariant.metaDescription) || getTranslatableField(product === null || product === void 0 ? void 0 : product.metaDescription),
|
62
65
|
keywords: getTranslatableField(selectedVariant === null || selectedVariant === void 0 ? void 0 : selectedVariant.metaKeywords) || getTranslatableField(product === null || product === void 0 ? void 0 : product.metaKeywords)
|
63
66
|
};
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@sentecacommerce-theme/lib",
|
3
3
|
"sideEffects": false,
|
4
|
-
"version": "0.13.
|
4
|
+
"version": "0.13.6",
|
5
5
|
"main": "dist/cjs/index.js",
|
6
6
|
"module": "dist/esm/index.js",
|
7
7
|
"types": "dist/types/index.d.ts",
|
@@ -31,13 +31,13 @@
|
|
31
31
|
"watch:cjs": "swc src --out-dir dist/cjs -w",
|
32
32
|
"watch:esm": "swc src --out-dir dist/esm --no-swcrc -w"
|
33
33
|
},
|
34
|
-
"gitHead": "
|
34
|
+
"gitHead": "a307a04a31d6966fad6c337cfe77c9bb93c5c49d",
|
35
35
|
"peerDependencies": {
|
36
36
|
"react-query": "^2.26.2"
|
37
37
|
},
|
38
38
|
"dependencies": {
|
39
|
-
"@sentecacommerce-theme/base": "^0.13.
|
40
|
-
"@sentecacommerce-theme/cms": "^0.13.
|
39
|
+
"@sentecacommerce-theme/base": "^0.13.6",
|
40
|
+
"@sentecacommerce-theme/cms": "^0.13.6",
|
41
41
|
"@sentecacommerce/sdk": "2.0.175",
|
42
42
|
"body-scroll-lock": "^3.1.5",
|
43
43
|
"copy-to-clipboard": "^3.3.1",
|