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

33 lines
818 B
React
Raw Normal View History

2020-03-14 17:07:36 +01:00
// @flow
import React from 'react';
import DateTime from 'component/dateTime';
import FileViewCount from 'component/fileViewCount';
import CreditAmount from 'component/common/credit-amount';
type Props = {
uri: string,
claim: StreamClaim,
pendingAmount: string,
2020-03-14 17:07:36 +01:00
};
function FileSubtitle(props: Props) {
const { uri, claim, pendingAmount } = props;
2020-03-14 17:07:36 +01:00
return (
<div className="media__subtitle--between">
<DateTime uri={uri} show={DateTime.SHOW_DATE} />
<span>
<CreditAmount
badge={false}
amount={parseFloat(claim.amount) + parseFloat(pendingAmount || claim.meta.support_amount)}
2020-03-14 17:07:36 +01:00
precision={2}
/>
{' • ' /* this is bad, but it's quick! */}
<FileViewCount uri={uri} />
</span>
</div>
);
}
export default FileSubtitle;