Skip to content

Commit 1b02997

Browse files
authored
Merge pull request #11 from TuanLuu54/feature/fix-pluralize-002-checkout
Convert string to number on pluralize lib
2 parents e232aa1 + 711a705 commit 1b02997

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎002-checkout/src/components/CheckoutArea/OrderSummary.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import pluralize from 'pluralize'
33

44
var OrderSummary = React.createClass({
55
render: function() {
6-
var duration = this.props.duration + " " +pluralize('day',this.props.duration);
6+
var duration = this.props.duration + " " +pluralize('day',parseInt(this.props.duration));
77

88
// Initial total Calculation
99
var initialTotal = this.props.duration * this.props.price;

‎002-checkout/src/components/ImagePreviewArea/WorkspaceComponents.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react'
22
import pluralize from 'pluralize'
33

44
function Information(props){
5-
var duration = pluralize('day',props.duration);
5+
var duration = pluralize('day',parseInt(props.duration));
66

77
return (
88
<div className="WorkspaceInformation">

0 commit comments

Comments
 (0)