@mjhls/mjh-framework 1.0.939-segment-test-v9 → 1.0.939-segment-test-v10
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/dist/cjs/View.js +9 -12
- package/dist/esm/View.js +9 -12
- package/package.json +1 -1
package/dist/cjs/View.js
CHANGED
|
@@ -528,11 +528,8 @@ var Recommended = function Recommended(props) {
|
|
|
528
528
|
case 6:
|
|
529
529
|
data = _context.sent;
|
|
530
530
|
|
|
531
|
-
|
|
532
|
-
console.log('persona result:', data);
|
|
533
|
-
|
|
534
531
|
if (!(data && data.traits && data.traits.favorite_article_category)) {
|
|
535
|
-
_context.next =
|
|
532
|
+
_context.next = 26;
|
|
536
533
|
break;
|
|
537
534
|
}
|
|
538
535
|
|
|
@@ -578,16 +575,16 @@ var Recommended = function Recommended(props) {
|
|
|
578
575
|
params = {
|
|
579
576
|
id: article._id
|
|
580
577
|
};
|
|
581
|
-
_context.next =
|
|
582
|
-
return asyncToGenerator._Promise.all([fetchWithTimeout(
|
|
578
|
+
_context.next = 17;
|
|
579
|
+
return asyncToGenerator._Promise.all([fetchWithTimeout(3000, function () {
|
|
583
580
|
return client.fetch(articlesQuery, params);
|
|
584
|
-
}), fetchWithTimeout(
|
|
581
|
+
}), fetchWithTimeout(2000, function () {
|
|
585
582
|
return client.fetch(videosQuery, params);
|
|
586
|
-
}), fetchWithTimeout(
|
|
583
|
+
}), fetchWithTimeout(2000, function () {
|
|
587
584
|
return client.fetch(podcastQuery, params);
|
|
588
585
|
})]);
|
|
589
586
|
|
|
590
|
-
case
|
|
587
|
+
case 17:
|
|
591
588
|
_ref2 = _context.sent;
|
|
592
589
|
_ref3 = slicedToArray._slicedToArray(_ref2, 3);
|
|
593
590
|
_articles = _ref3[0];
|
|
@@ -607,13 +604,13 @@ var Recommended = function Recommended(props) {
|
|
|
607
604
|
}
|
|
608
605
|
setArticles(_articles);
|
|
609
606
|
}
|
|
610
|
-
_context.next =
|
|
607
|
+
_context.next = 27;
|
|
611
608
|
break;
|
|
612
609
|
|
|
613
|
-
case
|
|
610
|
+
case 26:
|
|
614
611
|
setLoaded('failed');
|
|
615
612
|
|
|
616
|
-
case
|
|
613
|
+
case 27:
|
|
617
614
|
case 'end':
|
|
618
615
|
return _context.stop();
|
|
619
616
|
}
|
package/dist/esm/View.js
CHANGED
|
@@ -517,11 +517,8 @@ var Recommended = function Recommended(props) {
|
|
|
517
517
|
case 6:
|
|
518
518
|
data = _context.sent;
|
|
519
519
|
|
|
520
|
-
|
|
521
|
-
console.log('persona result:', data);
|
|
522
|
-
|
|
523
520
|
if (!(data && data.traits && data.traits.favorite_article_category)) {
|
|
524
|
-
_context.next =
|
|
521
|
+
_context.next = 26;
|
|
525
522
|
break;
|
|
526
523
|
}
|
|
527
524
|
|
|
@@ -567,16 +564,16 @@ var Recommended = function Recommended(props) {
|
|
|
567
564
|
params = {
|
|
568
565
|
id: article._id
|
|
569
566
|
};
|
|
570
|
-
_context.next =
|
|
571
|
-
return _Promise.all([fetchWithTimeout(
|
|
567
|
+
_context.next = 17;
|
|
568
|
+
return _Promise.all([fetchWithTimeout(3000, function () {
|
|
572
569
|
return client.fetch(articlesQuery, params);
|
|
573
|
-
}), fetchWithTimeout(
|
|
570
|
+
}), fetchWithTimeout(2000, function () {
|
|
574
571
|
return client.fetch(videosQuery, params);
|
|
575
|
-
}), fetchWithTimeout(
|
|
572
|
+
}), fetchWithTimeout(2000, function () {
|
|
576
573
|
return client.fetch(podcastQuery, params);
|
|
577
574
|
})]);
|
|
578
575
|
|
|
579
|
-
case
|
|
576
|
+
case 17:
|
|
580
577
|
_ref2 = _context.sent;
|
|
581
578
|
_ref3 = _slicedToArray(_ref2, 3);
|
|
582
579
|
_articles = _ref3[0];
|
|
@@ -596,13 +593,13 @@ var Recommended = function Recommended(props) {
|
|
|
596
593
|
}
|
|
597
594
|
setArticles(_articles);
|
|
598
595
|
}
|
|
599
|
-
_context.next =
|
|
596
|
+
_context.next = 27;
|
|
600
597
|
break;
|
|
601
598
|
|
|
602
|
-
case
|
|
599
|
+
case 26:
|
|
603
600
|
setLoaded('failed');
|
|
604
601
|
|
|
605
|
-
case
|
|
602
|
+
case 27:
|
|
606
603
|
case 'end':
|
|
607
604
|
return _context.stop();
|
|
608
605
|
}
|