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.es.js
CHANGED
|
@@ -6597,6 +6597,7 @@ const useCourseStyles = createUseStyles(theme => {
|
|
|
6597
6597
|
});
|
|
6598
6598
|
|
|
6599
6599
|
async function getCourseList(baseURLs, hashToken) {
|
|
6600
|
+
console.log('hash', baseURLs, hashToken);
|
|
6600
6601
|
if (!hashToken) {
|
|
6601
6602
|
throw 'Missing hash token';
|
|
6602
6603
|
}
|
|
@@ -6611,6 +6612,7 @@ async function getCourseList(baseURLs, hashToken) {
|
|
|
6611
6612
|
requiredFilters: '[10]'
|
|
6612
6613
|
}
|
|
6613
6614
|
});
|
|
6615
|
+
console.log('res', res);
|
|
6614
6616
|
if (res) {
|
|
6615
6617
|
return res.data;
|
|
6616
6618
|
}
|
|
@@ -6755,16 +6757,20 @@ function courses({
|
|
|
6755
6757
|
const [nodeData] = sectionData?.components;
|
|
6756
6758
|
const [utmParams, setUtmParams] = useState('');
|
|
6757
6759
|
const handleApiCall = () => {
|
|
6760
|
+
console.log('base', baseURLs);
|
|
6758
6761
|
if (baseURLs) {
|
|
6759
6762
|
getCourseList(baseURLs, hashToken).then(response => {
|
|
6763
|
+
console.log('response', response);
|
|
6760
6764
|
const placeholders = nodeData?.cardCarousel?.metadata?.placeholders;
|
|
6761
6765
|
const coursesData = response?.data?.coursesData;
|
|
6762
6766
|
if (coursesData && coursesData.length) {
|
|
6763
6767
|
setCardList(response?.data?.coursesData);
|
|
6764
6768
|
setShowShimmer(false);
|
|
6765
6769
|
} else {
|
|
6770
|
+
console.log('edit');
|
|
6766
6771
|
// For Edit Page: If no data found, show placeholders. If placeholder doesn't come from backend, show shimmer.
|
|
6767
6772
|
if (isEdit) {
|
|
6773
|
+
console.log('edit1', placeholders);
|
|
6768
6774
|
if (placeholders && placeholders.length) {
|
|
6769
6775
|
setShowShimmer(false);
|
|
6770
6776
|
setFallbackImages(placeholders);
|
|
@@ -6774,6 +6780,7 @@ function courses({
|
|
|
6774
6780
|
else setErrored(true);
|
|
6775
6781
|
}
|
|
6776
6782
|
}).catch(err => {
|
|
6783
|
+
console.log('err', err);
|
|
6777
6784
|
const errMsg = err?.response?.data?.data?.message;
|
|
6778
6785
|
if (errMsg === 'NOT_FOUND') {
|
|
6779
6786
|
if (nodeData?.cardCarousel?.metadata?.placeholders?.length && isEdit) {
|