25 lines
572 B
JavaScript
25 lines
572 B
JavaScript
import React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
|
|
import { formatPrice } from '../../library/helpers.js';
|
|
|
|
import {
|
|
StyleSheet,
|
|
Text,
|
|
} from 'react-native';
|
|
|
|
const AuctionPriceAndBidCount = ({ bidCount, currentPrice }) => {
|
|
return (
|
|
<Text style={styles.currentPriceAndBidCount} numberOfLines={1}>
|
|
{`${formatPrice(currentPrice)} (${bidCount} bids)`}
|
|
</Text>
|
|
);
|
|
};
|
|
|
|
AuctionPriceAndBidCount.propTypes = {
|
|
bidCount: PropTypes.number.isRequired,
|
|
currentPrice: PropTypes.number.isRequired,
|
|
};
|
|
|
|
export default AuctionPriceAndBidCount;
|