- implementing immutable.js

This commit is contained in:
2019-07-17 03:21:23 -04:00
parent 8ecf036cc4
commit 434a1ded24
39 changed files with 1123 additions and 187 deletions

View File

@@ -3,10 +3,10 @@ import PropTypes from 'prop-types';
import {
StyleSheet,
View,
Text,
} from 'react-native';
const BidStatus = ({ bidCount, currentPrice, isBidding, isWinning }) => {
const BidStatus = ({ isBidding, isWinning }) => {
if (!isBidding) {
return null;
}
@@ -17,16 +17,16 @@ const BidStatus = ({ bidCount, currentPrice, isBidding, isWinning }) => {
return (
<Text style={statusBarStyle} numberOfLines={1}>
{`${currentPrice} (${bidCount} bids)`}
{isWinning && `Oh no! You have been outbid!`}
{!isWinning && isBidding && `You have the winning bid! (for now...)`}
</Text>
);
};
BidStatus.propTypes = {
bidCount: PropTypes.number.isRequired,
currentPrice: PropTypes.number.isRequired,
isBidding: PropTypes.bool.isRequired,
isWinning: PropTypes.bool.isRequired,
itemId: PropTypes.string.isRequired,
};
const styles = StyleSheet.create({