diff --git a/common/app/routes/Jobs/components/GoToPayPal.jsx b/common/app/routes/Jobs/components/GoToPayPal.jsx index 8455f3fc47..6e3a7d6b55 100644 --- a/common/app/routes/Jobs/components/GoToPayPal.jsx +++ b/common/app/routes/Jobs/components/GoToPayPal.jsx @@ -28,7 +28,47 @@ export default contain( propTypes: { id: PropTypes.string, isHighlighted: PropTypes.bool, - buttonId: PropTypes.string + buttonId: PropTypes.string, + price: PropTypes.number, + discountAmount: PropTypes.number + }, + + renderDiscount(discountAmount) { + if (!discountAmount) { + return null; + } + return ( + + +

Discount

+ + +

-{ discountAmount }

+ +
+ ); + }, + + renderHighlightPrice(isHighlighted) { + if (!isHighlighted) { + return null; + } + return ( + + +

Highlighting

+ + +

+ 50

+ +
+ ); }, render() { @@ -68,17 +108,8 @@ export default contain(

+{ price }

- - -

Discount

- - -

-{ discountAmount }

- -
+ { this.renderDiscount(discountAmount) } + { this.renderHighlightPrice(isHighlighted) } -

${ price - discountAmount }

+

${ + price - discountAmount + (isHighlighted ? 50 : 0) + }