1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00

Merge pull request #213 from oceanprotocol/fix/additionalInformation

more additionalInformation checks
This commit is contained in:
Matthias Kretschmann 2020-01-07 12:14:48 +01:00 committed by GitHub
commit c98fc44d35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,15 +39,17 @@ const AssetTeaser = ({
} }
> >
<Link to={`/asset/${asset.id}`}> <Link to={`/asset/${asset.id}`}>
{additionalInformation.categories && !minimal && ( {additionalInformation &&
<CategoryImage additionalInformation.categories &&
dimmed !minimal && (
category={additionalInformation.categories[0]} <CategoryImage
/> dimmed
)} category={additionalInformation.categories[0]}
/>
)}
<h1>{main.name}</h1> <h1>{main.name}</h1>
{!minimal && ( {additionalInformation && !minimal && (
<div className={styles.description}> <div className={styles.description}>
<Dotdotdot clamp={3}> <Dotdotdot clamp={3}>
{additionalInformation.description} {additionalInformation.description}
@ -55,9 +57,10 @@ const AssetTeaser = ({
</div> </div>
)} )}
<footer className={styles.assetFooter}> <footer className={styles.assetFooter}>
{additionalInformation.categories && ( {additionalInformation &&
<div>{additionalInformation.categories[0]}</div> additionalInformation.categories && (
)} <div>{additionalInformation.categories[0]}</div>
)}
{allowPricing && ( {allowPricing && (
<div className={styles.price}> <div className={styles.price}>
<span> <span>