mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-11 21:27:05 +00:00
dont render background if it is not valid prop
This commit is contained in:
parent
dc74047e47
commit
c9a6bebb35
1 changed files with 12 additions and 7 deletions
|
|
@ -68,13 +68,18 @@ const MetaPreview = ({ className, compact = false, id, type, name, logo = '', ba
|
|||
}, []);
|
||||
return (
|
||||
<div className={classnames(className, styles['meta-preview-container'], { [styles['compact']]: compact })}>
|
||||
<div className={styles['background-image-layer']}>
|
||||
<img
|
||||
className={styles['background-image']}
|
||||
src={background}
|
||||
alt={' '}
|
||||
/>
|
||||
</div>
|
||||
{
|
||||
typeof background === 'string' && background.length > 0 ?
|
||||
<div className={styles['background-image-layer']}>
|
||||
<img
|
||||
className={styles['background-image']}
|
||||
src={background}
|
||||
alt={' '}
|
||||
/>
|
||||
</div>
|
||||
:
|
||||
null
|
||||
}
|
||||
<div className={styles['meta-info']}>
|
||||
{
|
||||
typeof logo === 'string' && logo.length > 0 ?
|
||||
|
|
|
|||
Loading…
Reference in a new issue