lbry-desktop/ui/component/claimPreviewTitle/view.jsx

22 lines
458 B
React
Raw Permalink Normal View History

// @flow
import React from 'react';
import TruncatedText from 'component/common/truncated-text';
type Props = {
uri: string,
claim: ?Claim,
title: string,
};
2020-01-30 23:25:15 +01:00
function ClaimPreviewTitle(props: Props) {
const { title, claim } = props;
2020-03-19 15:38:20 +01:00
return (
2020-01-30 23:25:15 +01:00
<div className="claim-preview__title">
{claim ? <TruncatedText text={title || claim.name} lines={2} /> : <span>{__('Nothing here')}</span>}
</div>
);
}
2020-01-30 23:25:15 +01:00
export default ClaimPreviewTitle;