Skip to content

Commit 1ab2d74

Browse files
committed
missing change
1 parent 2ce3ae8 commit 1ab2d74

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/bundle/ui-dev/src/modules/sub-items/components/grid-view/grid.view.item.component.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ const GridViewItemComponent = ({ item, generateLink }) => {
99
const imageClassName = 'ibexa-grid-view-item__image';
1010
const contentTypeIdentifier = content._info.contentType.identifier;
1111
const contentTypeIconUrl = ibexa.helpers.contentType.getContentTypeIconUrl(contentTypeIdentifier);
12+
const contentTypeName = ibexa.helpers.contentType.getContentTypeName(contentTypeIdentifier);
1213
let image = null;
13-
let contentTypeIcon = null;
1414

1515
if (content._thumbnail === null || content._thumbnail.mimeType === 'image/svg+xml') {
1616
image = (
@@ -22,7 +22,6 @@ const GridViewItemComponent = ({ item, generateLink }) => {
2222
const { uri, alternativeText } = content._thumbnail;
2323

2424
image = <img className={imageClassName} src={uri} alt={alternativeText} />;
25-
contentTypeIcon = <Icon customPath={contentTypeIconUrl} extraClasses="ibexa-icon--small" />;
2625
}
2726

2827
return (
@@ -32,7 +31,10 @@ const GridViewItemComponent = ({ item, generateLink }) => {
3231
<div className="ibexa-grid-view-item__title" title={content._name}>
3332
{content._name}
3433
</div>
35-
<div className="ibexa-grid-view-item__detail-a">{contentTypeIcon}</div>
34+
<div className="ibexa-grid-view-item__detail-a">
35+
<Icon customPath={contentTypeIconUrl} extraClasses="ibexa-icon--small" />
36+
{contentTypeName}
37+
</div>
3638
</div>
3739
</a>
3840
);

0 commit comments

Comments
 (0)