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,
|
2020-03-25 04:15:05 +01:00
|
|
|
pendingAmount: string,
|
2020-03-14 17:07:36 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
function FileSubtitle(props: Props) {
|
2020-03-25 04:15:05 +01:00
|
|
|
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}
|
2020-03-25 04:15:05 +01:00
|
|
|
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;
|