@jetshop/core 5.14.4 → 5.14.5
Sign up to get free protection for your applications and to get access to all the features.
- package/components/Head.js +5 -2
- package/components/Head.js.map +1 -1
- package/package.json +1 -1
package/components/Head.js
CHANGED
@@ -27,7 +27,7 @@ function renderAlternateRoutes(alternateRoute, channelsById, selectedChannelGrou
|
|
27
27
|
}
|
28
28
|
const queryParamsWhitelist = ['page'];
|
29
29
|
const Head = ({ data, route }) => {
|
30
|
-
var _a;
|
30
|
+
var _a, _b;
|
31
31
|
const { search, pathname } = useLocation();
|
32
32
|
const queryStringObject = qs.parse(search, { ignoreQueryPrefix: true });
|
33
33
|
Object.keys(queryStringObject).forEach((key) => {
|
@@ -43,6 +43,8 @@ const Head = ({ data, route }) => {
|
|
43
43
|
if (!selectedChannel.language.isDefault) {
|
44
44
|
languageBasename = `/${getLanguageFromCulture(selectedChannel.language.culture)}`;
|
45
45
|
}
|
46
|
+
const disallowIndexing = (_b = ((data.__typename === 'Category' || data.__typename === 'Page') &&
|
47
|
+
!(data === null || data === void 0 ? void 0 : data.allowWebIndexing))) !== null && _b !== void 0 ? _b : false;
|
46
48
|
const fullPath = `${languageBasename}${(route === null || route === void 0 ? void 0 : route.canonicalPath) || ''}`;
|
47
49
|
const href = (route === null || route === void 0 ? void 0 : route.canonicalPath) &&
|
48
50
|
`${selectedChannel.url}${fullPath}${whiteListedSearch}`;
|
@@ -72,7 +74,8 @@ const Head = ({ data, route }) => {
|
|
72
74
|
route.alternateRoutes &&
|
73
75
|
route.alternateRoutes.map((alternateRoute) => renderAlternateRoutes(alternateRoute, channelsById, selectedChannelGroup &&
|
74
76
|
selectedChannelGroup.map((channel) => channel.id))),
|
75
|
-
href && React.createElement("link", { rel: "canonical", href: href })
|
77
|
+
href && React.createElement("link", { rel: "canonical", href: href }),
|
78
|
+
disallowIndexing && React.createElement("meta", { name: "robots", content: "noindex" })),
|
76
79
|
!disableOpenGraphGeneralData && (React.createElement(OpenGraphGeneralPageData, { route: route, data: data })),
|
77
80
|
(route === null || route === void 0 ? void 0 : route.canonicalPath) === '/' && React.createElement(SiteLinksSearchStructuredData, null)));
|
78
81
|
};
|
package/components/Head.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Head.js","sourceRoot":"","sources":["Head.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAWlE,OAAO,KAAK,EAAE,EAAM,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,eAAe,MAAM,0BAA0B,CAAC;AACvD,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,6BAA6B,EAAE,MAAM,kBAAkB,CAAC;AAWjE,SAAS,qBAAqB,CAC5B,cAA8B,EAC9B,YAEC,EACD,uBAAiC,SAAS;IAE1C,MAAM,OAAO,GAAG,YAAY,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;IAEvD,uEAAuE;IACvE,IAAI,oBAAoB,IAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE;QACtE,OAAO,IAAI,CAAC;KACb;IAED,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;IACxB,MAAM,KAAK,GAAG,cAAc,CAAC,KAAK,CAAC;IACnC,IAAI,gBAAgB,GAAG,EAAE,CAAC;IAC1B,IAAI,OAAO,CAAC,eAAe,CAAC,OAAO,KAAK,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