@learningpool/ui 1.15.3 → 1.15.4
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.
|
@@ -367,6 +367,7 @@ var AppSwitcher = function (props) {
|
|
|
367
367
|
// Update state and cache if we have campaigns
|
|
368
368
|
if (Array.isArray(promotionalCampaigns_1) && promotionalCampaigns_1.length > 0) {
|
|
369
369
|
setPromotionalCampaigns(promotionalCampaigns_1);
|
|
370
|
+
setValidCampaignCount(promotionalCampaigns_1.length);
|
|
370
371
|
window.localStorage.setItem(Constants.LocalStorageKey.PromotionalCampaigns, JSON.stringify(promotionalCampaigns_1));
|
|
371
372
|
}
|
|
372
373
|
else {
|
|
@@ -24,13 +24,18 @@ var PromotionalCampaignItem = function (_a) {
|
|
|
24
24
|
};
|
|
25
25
|
if (!imageLoaded)
|
|
26
26
|
return null;
|
|
27
|
-
return (_jsx(PromotionalCampaignCardStyled, { children: _jsx(PromotionalCampaignCardActionArea, __assign({ onClick: function () { return window.open(linkUrl, '_blank'); } }, { children: _jsx(CardMedia, { component: "
|
|
27
|
+
return (_jsx(PromotionalCampaignCardStyled, { children: _jsx(PromotionalCampaignCardActionArea, __assign({ onClick: function () { return window.open(linkUrl, '_blank'); } }, { children: _jsx(CardMedia, __assign({ component: "div", sx: {
|
|
28
28
|
width: '100%',
|
|
29
29
|
height: '100%',
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
position: 'relative'
|
|
31
|
+
} }, { children: _jsx("img", { src: imageUrl, alt: altText, onError: handleImageError, style: {
|
|
32
|
+
width: '100%',
|
|
33
|
+
height: '100%',
|
|
34
|
+
objectFit: 'cover',
|
|
35
|
+
objectPosition: 'center',
|
|
36
|
+
position: 'absolute',
|
|
37
|
+
top: 0,
|
|
38
|
+
left: 0
|
|
39
|
+
} }) })) })) }));
|
|
35
40
|
};
|
|
36
41
|
export default PromotionalCampaignItem;
|