1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-11-14 17:24:51 +01:00

handle empty values in preview

This commit is contained in:
Matthias Kretschmann 2020-07-17 16:59:18 +02:00
parent c4f2df15e5
commit bd0fde6790
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -15,7 +15,7 @@ export default function Preview({
return (
<div className={styles.preview}>
<header>
<h2>{values.name}</h2>
{values.name && <h2>{values.name}</h2>}
{values.description && <Markdown text={values.description} />}
{values.files && values.files.length && (
<File
@ -36,7 +36,8 @@ export default function Preview({
key.includes('description') ||
key.includes('tags') ||
key.includes('files') ||
key.includes('termsAndConditions')
key.includes('termsAndConditions') ||
value === undefined
)
)
.map(([key, value]) => (