gatsby-core-theme 44.1.6 → 44.1.8

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/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ ## [44.1.8](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.1.7...v44.1.8) (2025-06-09)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * load defaultImg if there is no src ([34ed7d7](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/34ed7d77139f27b55e7ae05ea256c024b664727a))
7
+
8
+
9
+ * Merge branch 'tm-5506-load-deafult-img' into 'master' ([f65e038](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/f65e038d2e307cc87775f01478807d0ed3df4e99))
10
+
11
+ ## [44.1.7](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.1.6...v44.1.7) (2025-06-09)
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * added lower priority to notif image ([af33708](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/af3370820485b3c1d0137530931cadb154c8d436))
17
+ * added prop to prefer banner to relation logo ([22d70d5](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/22d70d5fd25ad33dddb326b6c5a04c23966f7204))
18
+
1
19
  ## [44.1.6](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.1.5...v44.1.6) (2025-06-04)
2
20
 
3
21
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-core-theme",
3
- "version": "44.1.6",
3
+ "version": "44.1.8",
4
4
  "description": "Gatsby Theme NPM Package",
5
5
  "author": "",
6
6
  "license": "ISC",
@@ -9,7 +9,7 @@ import useTranslate from '~hooks/useTranslate/useTranslate';
9
9
  import CloseIcon from '~images/icons/close';
10
10
  import styles from './notification-items.module.scss';
11
11
 
12
- const CardsItems = ({ module, onClose }) => {
12
+ const CardsItems = ({ module, onClose, useBanner = false }) => {
13
13
  const { items } = module;
14
14
  const noNewUpdates = useTranslate('noNewUpdates', 'No new items');
15
15
 
@@ -39,7 +39,8 @@ const CardsItems = ({ module, onClose }) => {
39
39
  }
40
40
 
41
41
  const content = (item) => {
42
- const img = getExtraField(item?.extra_fields, 'notification_image') || item?.relation?.logo?.filename || '';
42
+ const priorityImage = useBanner ? item?.banner || item?.relation?.logo?.fileName : item?.relation?.logo?.fileName;
43
+ const img = getExtraField(item?.extra_fields, 'notification_image') || priorityImage || '';
43
44
  const imageSrc = imagePrettyUrl(img, 40, 40);
44
45
  const fileName = getImageFilename(imageSrc);
45
46
 
@@ -123,7 +124,8 @@ CardsItems.propTypes = {
123
124
  module: PropTypes.shape({
124
125
  items: PropTypes.arrayOf(PropTypes.shape({}))
125
126
  }),
126
- onClose: PropTypes.func
127
+ onClose: PropTypes.func,
128
+ useBanner: PropTypes.bool
127
129
  };
128
130
 
129
131
  export default CardsItems;
@@ -1,19 +1,18 @@
1
- import React from 'react';
1
+ import React from "react";
2
2
  // eslint-disable-next-line import/no-extraneous-dependencies
3
- import PropTypes from 'prop-types';
4
-
3
+ import PropTypes from "prop-types";
5
4
 
6
5
  export default function LazyImage({
7
6
  height,
8
7
  width,
9
8
  style = {},
10
9
  className,
11
- src = '#',
12
- alt = '',
10
+ src = "#",
11
+ alt = "",
13
12
  defaultImg,
14
- loading = 'lazy',
13
+ loading = "lazy",
15
14
  }) {
16
- if (defaultImg && !src) {
15
+ if (defaultImg && (!src || src === "#")) {
17
16
  return defaultImg;
18
17
  }
19
18
 
@@ -21,10 +20,10 @@ export default function LazyImage({
21
20
  <img
22
21
  src={src}
23
22
  loading={loading}
24
- className={className || ''}
23
+ className={className || ""}
25
24
  height={height}
26
25
  width={width}
27
- alt={alt === 'null' ? '' : alt}
26
+ alt={alt === "null" ? "" : alt}
28
27
  style={style}
29
28
  />
30
29
  );