feat: show expiration date when it is available

This commit is contained in:
Jonathan Rainville 2019-05-22 15:08:34 -04:00
parent 0193a25bd0
commit 99e162b074
No known key found for this signature in database
GPG Key ID: 5F4630B759727D9C
1 changed files with 2 additions and 0 deletions

View File

@ -3,6 +3,7 @@ import {Row, Col} from 'reactstrap';
import {faQuestionCircle} from "@fortawesome/free-solid-svg-icons"; import {faQuestionCircle} from "@fortawesome/free-solid-svg-icons";
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import RoundedIcon from "../../../ui/RoundedIcon"; import RoundedIcon from "../../../ui/RoundedIcon";
import moment from "moment";
const EscrowDetail = ({escrow}) => <Row className="mt-4"> const EscrowDetail = ({escrow}) => <Row className="mt-4">
<Col xs="2"> <Col xs="2">
@ -12,6 +13,7 @@ const EscrowDetail = ({escrow}) => <Row className="mt-4">
<h5 className="m-0">Trade details</h5> <h5 className="m-0">Trade details</h5>
<p className="text-dark m-0">{(escrow.tokenAmount * escrow.assetPrice / 100).toFixed(2)} {escrow.offer.currency} for {escrow.tokenAmount} {escrow.token.symbol}</p> <p className="text-dark m-0">{(escrow.tokenAmount * escrow.assetPrice / 100).toFixed(2)} {escrow.offer.currency} for {escrow.tokenAmount} {escrow.token.symbol}</p>
<p className="text-dark m-0">{escrow.token.symbol} Price = {escrow.assetPrice / 100} {escrow.offer.currency}</p> <p className="text-dark m-0">{escrow.token.symbol} Price = {escrow.assetPrice / 100} {escrow.offer.currency}</p>
{escrow.expirationTime && escrow.expirationTime !== '0' && <p className="text-dark m-0">Expiration time: {moment(escrow.expirationTime * 1000).toString()}</p>}
</Col> </Col>
</Row>; </Row>;