// @flow import React, { Fragment, PureComponent } from 'react'; import MarkdownPreview from 'component/common/markdown-preview'; import ClaimTags from 'component/claimTags'; import Card from 'component/common/card'; type Props = { uri: string, claim: StreamClaim, metadata: StreamMetadata, user: ?any, tags: any, }; class FileDescription extends PureComponent { render() { const { uri, claim, metadata, tags } = this.props; if (!claim || !metadata) { return {__('Empty claim or metadata info.')}; } const { description } = metadata; if (!description && !(tags && tags.length)) return null; return ( {description && (
)} } />
); } } export default FileDescription;