Update MetaPreview.js

This commit is contained in:
kKaskak 2023-09-06 11:34:33 +03:00
parent d323e8d098
commit a9683ba077

View file

@ -157,28 +157,34 @@ const MetaPreview = ({ className, compact, name, logo, background, runtime, rele
: :
null null
} }
{ {
typeof description === 'string' && description.length > 0 ? compact && typeof description === 'string' && description.length > 0 ?
<div className={styles['description-container']}>{description}</div> <div className={styles['description-container']}>{description}</div>
: :
null null
} }
{ {
Array.from(linksGroups.keys()) Array.from(linksGroups.keys())
.filter((category) => { .filter((category) => {
return category !== CONSTANTS.IMDB_LINK_CATEGORY && return category !== CONSTANTS.IMDB_LINK_CATEGORY &&
category !== CONSTANTS.SHARE_LINK_CATEGORY && category !== CONSTANTS.SHARE_LINK_CATEGORY &&
category !== CONSTANTS.WRITERS_LINK_CATEGORY; category !== CONSTANTS.WRITERS_LINK_CATEGORY;
}) })
.map((category, index) => ( .map((category, index) => (
<MetaLinks <MetaLinks
key={index} key={index}
className={styles['meta-links']} className={styles['meta-links']}
label={category} label={category}
links={linksGroups.get(category)} links={linksGroups.get(category)}
/> />
)) ))
} }
{
!compact && typeof description === 'string' && description.length > 0 ?
<div className={styles['description-container']}>{description}</div>
:
null
}
</div> </div>
<div className={styles['action-buttons-container']}> <div className={styles['action-buttons-container']}>
{ {