diy-template-components 2.0.107 → 2.0.109
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/build/index.es.js +7 -0
- package/build/index.es.js.map +1 -1
- package/build/index.js +7 -0
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -6613,6 +6613,7 @@ const useCourseStyles = createUseStyles(theme => {
|
|
|
6613
6613
|
});
|
|
6614
6614
|
|
|
6615
6615
|
async function getCourseList(baseURLs, hashToken) {
|
|
6616
|
+
console.log('hash', baseURLs, hashToken);
|
|
6616
6617
|
if (!hashToken) {
|
|
6617
6618
|
throw 'Missing hash token';
|
|
6618
6619
|
}
|
|
@@ -6627,6 +6628,7 @@ async function getCourseList(baseURLs, hashToken) {
|
|
|
6627
6628
|
requiredFilters: '[10]'
|
|
6628
6629
|
}
|
|
6629
6630
|
});
|
|
6631
|
+
console.log('res', res);
|
|
6630
6632
|
if (res) {
|
|
6631
6633
|
return res.data;
|
|
6632
6634
|
}
|
|
@@ -6771,16 +6773,20 @@ function courses({
|
|
|
6771
6773
|
const [nodeData] = sectionData?.components;
|
|
6772
6774
|
const [utmParams, setUtmParams] = React.useState('');
|
|
6773
6775
|
const handleApiCall = () => {
|
|
6776
|
+
console.log('base', baseURLs);
|
|
6774
6777
|
if (baseURLs) {
|
|
6775
6778
|
getCourseList(baseURLs, hashToken).then(response => {
|
|
6779
|
+
console.log('response', response);
|
|
6776
6780
|
const placeholders = nodeData?.cardCarousel?.metadata?.placeholders;
|
|
6777
6781
|
const coursesData = response?.data?.coursesData;
|
|
6778
6782
|
if (coursesData && coursesData.length) {
|
|
6779
6783
|
setCardList(response?.data?.coursesData);
|
|
6780
6784
|
setShowShimmer(false);
|
|
6781
6785
|
} else {
|
|
6786
|
+
console.log('edit');
|
|
6782
6787
|
// For Edit Page: If no data found, show placeholders. If placeholder doesn't come from backend, show shimmer.
|
|
6783
6788
|
if (isEdit) {
|
|
6789
|
+
console.log('edit1', placeholders);
|
|
6784
6790
|
if (placeholders && placeholders.length) {
|
|
6785
6791
|
setShowShimmer(false);
|
|
6786
6792
|
setFallbackImages(placeholders);
|
|
@@ -6790,6 +6796,7 @@ function courses({
|
|
|
6790
6796
|
else setErrored(true);
|
|
6791
6797
|
}
|
|
6792
6798
|
}).catch(err => {
|
|
6799
|
+
console.log('err', err);
|
|
6793
6800
|
const errMsg = err?.response?.data?.data?.message;
|
|
6794
6801
|
if (errMsg === 'NOT_FOUND') {
|
|
6795
6802
|
if (nodeData?.cardCarousel?.metadata?.placeholders?.length && isEdit) {
|