@times-components/ssr 2.59.37-5427bcc24c891fe27e99a173de9def34ca764475.18 → 2.59.37-571e1120a1261d1235099f771214325dd11fd048.20
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": "@times-components/ssr",
|
|
3
3
|
"main": "src",
|
|
4
|
-
"version": "2.59.37-
|
|
4
|
+
"version": "2.59.37-571e1120a1261d1235099f771214325dd11fd048.20+571e1120a1",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"bundle:dev": "yarn cleanup-dist && webpack --config=webpack.config.js",
|
|
7
7
|
"bundle:prod": "yarn cleanup-dist && NODE_ENV=production webpack --config=webpack.config.js -p",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"webpack": "4.30.0"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@times-components/article": "^7.17.
|
|
55
|
+
"@times-components/article": "^7.17.56-571e1120a1261d1235099f771214325dd11fd048.20+571e1120a1",
|
|
56
56
|
"@times-components/author-profile": "^6.19.20",
|
|
57
57
|
"@times-components/context": "^1.24.0",
|
|
58
58
|
"@times-components/provider": "^1.41.5",
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
"publishConfig": {
|
|
80
80
|
"access": "public"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "571e1120a1261d1235099f771214325dd11fd048"
|
|
83
83
|
}
|
package/src/component/article.js
CHANGED
|
@@ -60,14 +60,12 @@ module.exports = (client, analyticsStream, data, helmetContext) => {
|
|
|
60
60
|
? providerData.draftArticle
|
|
61
61
|
: providerData.article;
|
|
62
62
|
const articleTemplate = article ? article.template : null;
|
|
63
|
-
const articleContent = article.content
|
|
64
|
-
setExternalLinkTargets(contentItem.children)
|
|
65
|
-
);
|
|
63
|
+
const articleContent = setExternalLinkTargets(article.content);
|
|
66
64
|
|
|
67
65
|
const formattedArticle = { ...article, content: articleContent };
|
|
68
66
|
|
|
69
67
|
// eslint-disable-next-line no-console
|
|
70
|
-
console.log("Article: ", article);
|
|
68
|
+
console.log("Article: ", article, articleDataFromRender);
|
|
71
69
|
|
|
72
70
|
// eslint-disable-next-line no-console
|
|
73
71
|
console.log("Formatted Article: ", formattedArticle);
|
|
@@ -3,12 +3,10 @@ const {
|
|
|
3
3
|
travelSiteCode,
|
|
4
4
|
skimlinksId,
|
|
5
5
|
regexTrackonomics
|
|
6
|
-
} = require("
|
|
6
|
+
} = require("../constants/affiliate-validation");
|
|
7
7
|
|
|
8
|
-
const wrapAffiliateLink = affiliateLink => {
|
|
8
|
+
const wrapAffiliateLink = (affiliateLink, contentPageUrl) => {
|
|
9
9
|
const wrapTrackonomics = trackonomicsUrl => {
|
|
10
|
-
const contentPageUrl =
|
|
11
|
-
"https://www.thetimes.com/travel/inspiration/tour-holidays/adventurous-summer-holidays-kklt22gp8";
|
|
12
10
|
const isTravel =
|
|
13
11
|
contentPageUrl.includes("https://www.thetimes.com/travel") ||
|
|
14
12
|
contentPageUrl.includes("https://www.thetimes.co.uk/travel");
|
|
@@ -17,12 +15,11 @@ const wrapAffiliateLink = affiliateLink => {
|
|
|
17
15
|
return trackonomicsUrl;
|
|
18
16
|
}
|
|
19
17
|
|
|
20
|
-
const referrerUrl =
|
|
21
|
-
"https://www.thetimes.com/travel/inspiration/tour-holidays/adventurous-summer-holidays-kklt22gp8";
|
|
18
|
+
const referrerUrl = "";
|
|
22
19
|
const siteCode = isTravel ? travelSiteCode : theTimesSiteCode;
|
|
23
20
|
const affiliateWrapper = `https://clicks.trx-hub.com/xid/${siteCode}?q=${encodeURIComponent(
|
|
24
21
|
trackonomicsUrl
|
|
25
|
-
)}&p=${encodeURIComponent(
|
|
22
|
+
)}&p=${encodeURIComponent(referrerUrl)}&ref=${encodeURIComponent(
|
|
26
23
|
referrerUrl
|
|
27
24
|
)}`;
|
|
28
25
|
|
|
@@ -30,8 +27,6 @@ const wrapAffiliateLink = affiliateLink => {
|
|
|
30
27
|
};
|
|
31
28
|
|
|
32
29
|
const wrapSkimlinks = skimlinkUrl => {
|
|
33
|
-
const contentPageUrl =
|
|
34
|
-
"https://www.thetimes.com/travel/inspiration/tour-holidays/adventurous-summer-holidays-kklt22gp8";
|
|
35
30
|
const affiliateWrapper = `https://go.skimresources.com/?id=${skimlinksId}&url=${encodeURIComponent(
|
|
36
31
|
skimlinkUrl
|
|
37
32
|
)}&sref=${encodeURIComponent(contentPageUrl)}`;
|
|
File without changes
|