-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcheck_out_total.jsx
89 lines (78 loc) · 3.57 KB
/
check_out_total.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
import React from 'react';
import { Link, hashHistory } from 'react-router';
class CheckOutTotal extends React.Component {
constructor (props) {
super(props);
}
render() {
if (this.props.perk) {
return(
<div className="check-out-total">
<div className="top-square">
<div className="check-out-header-top-square">Your Perk</div>
<div className="check-out-perk-title">{this.props.perk.title}</div>
</div>
<div className="review">
<div className="check-out-header">Review & Pay</div>
<div className="subtotals">
<div>
<div>{this.props.perk.title}</div>
<div>Shipping</div>
</div>
<div className="price">
<div>${Number(this.props.perk.price).toLocaleString()} <text className="currency">USD</text></div>
<div>—</div>
</div>
</div>
<hr className="divider"/>
<div className="total">
<div className="check-out-header">Total</div>
<div>${Number(this.props.perk.price).toLocaleString()} <text className="currency">USD</text></div>
</div>
<p>By clicking 'Submit Payment', you acknowledge you are contributing to <strong> a work-in-progress and not making a direct purchase</strong>. Perks are managed by campaigners and cannot be guaranteed by Indiegogo. You also acknowledge and agree to our Terms of Use and Privacy Policy.</p>
<input onClick={this.props.handleSubmit} type="submit" className="pink-button-check-out" value="SUBMIT PAYMENT"/>
</div>
</div>
);
} else {
return (
<div className="check-out-total">
<div className="top-square">
<div>
<div className="check-out-header-top-square">Your Contribution <Link className="add-perk-link" to={'/campaigns/' + this.props.campaign_id}> Add Perk</Link></div>
</div>
<div className="codi">
<span className="codi-sign">$</span>
<span className="codi-currency">USD</span>
<input className="check-out-donation-input"
type="number"
value={this.props.amount}
onChange={this.props.updateAmount}/>
</div>
</div>
<div className="review">
<div className="check-out-header">Review & Pay</div>
<div className="subtotals">
<div>
<div>Your Contribution</div>
</div>
<div className="price">
<div>
<div>${Number(this.props.amount).toLocaleString()} <text className="currency">USD</text></div>
</div>
</div>
</div>
<hr className="divider"/>
<div className="total">
<div className="check-out-header">Total</div>
<div>${Number(this.props.amount).toLocaleString()} <text className="currency">USD</text></div>
</div>
<p>By clicking 'Submit Payment', you acknowledge you are contributing to <strong> a work-in-progress and not making a direct purchase </strong>. Perks are managed by campaigners and cannot be guaranteed by Indiegogo. You also acknowledge and agree to our Terms of Use and Privacy Policy.</p>
<input onClick={this.props.handleSubmit} type="submit" className="pink-button-check-out" value="SUBMIT PAYMENT"/>
</div>
</div>
);
}
}
}
export default CheckOutTotal;