2020-02-12 16:10:17 +01:00
|
|
|
// @flow
|
|
|
|
import React from 'react';
|
2020-09-16 18:26:14 +02:00
|
|
|
import CreditAmount from 'component/common/credit-amount';
|
2020-02-12 16:10:17 +01:00
|
|
|
|
|
|
|
type Props = {
|
|
|
|
uri: string,
|
|
|
|
claim: ?Claim,
|
|
|
|
};
|
|
|
|
|
2020-09-02 22:08:37 +02:00
|
|
|
function ClaimEffectiveAmount(props: Props) {
|
2020-02-12 16:10:17 +01:00
|
|
|
const { claim } = props;
|
|
|
|
|
|
|
|
if (!claim) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2020-12-04 01:10:23 +01:00
|
|
|
return <CreditAmount amount={Number(claim.meta.effective_amount || claim.amount)} />;
|
2020-02-12 16:10:17 +01:00
|
|
|
}
|
|
|
|
|
2020-09-02 22:08:37 +02:00
|
|
|
export default ClaimEffectiveAmount;
|