From 10e9fa238ae6c1b0114449eef9d6d776a8dd7a51 Mon Sep 17 00:00:00 2001 From: Vesa Luusua Date: Mon, 3 Jul 2017 12:22:31 +0300 Subject: [PATCH] CheckoutPage design & line-item fixes --- src/containers/CheckoutPage/CheckoutPage.js | 14 +++++++++-- .../__snapshots__/CheckoutPage.test.js.snap | 25 +++++++++++++------ .../StripePaymentForm/StripePaymentForm.js | 6 ++--- 3 files changed, 33 insertions(+), 12 deletions(-) diff --git a/src/containers/CheckoutPage/CheckoutPage.js b/src/containers/CheckoutPage/CheckoutPage.js index 80236933..94bb5f7c 100644 --- a/src/containers/CheckoutPage/CheckoutPage.js +++ b/src/containers/CheckoutPage/CheckoutPage.js @@ -42,13 +42,23 @@ const breakdown = (bookingStart, bookingEnd, unitPrice) => { return null; } const totalPrice = estimatedTotalPrice(bookingStart, bookingEnd, unitPrice); + const nightCount = nightsBetween(bookingStart, bookingEnd); + return ( ); }; diff --git a/src/containers/CheckoutPage/__snapshots__/CheckoutPage.test.js.snap b/src/containers/CheckoutPage/__snapshots__/CheckoutPage.test.js.snap index 37a4bcd5..df731d66 100644 --- a/src/containers/CheckoutPage/__snapshots__/CheckoutPage.test.js.snap +++ b/src/containers/CheckoutPage/__snapshots__/CheckoutPage.test.js.snap @@ -36,18 +36,29 @@ exports[`CheckoutPage matches snapshot 1`] = ` + userRole="customer" />

diff --git a/src/containers/StripePaymentForm/StripePaymentForm.js b/src/containers/StripePaymentForm/StripePaymentForm.js index 67954a7a..0ac3818c 100644 --- a/src/containers/StripePaymentForm/StripePaymentForm.js +++ b/src/containers/StripePaymentForm/StripePaymentForm.js @@ -1,7 +1,7 @@ import React, { Component, PropTypes } from 'react'; import { FormattedMessage, injectIntl, intlShape } from 'react-intl'; import classNames from 'classnames'; -import { Button } from '../../components'; +import { PrimaryButton } from '../../components'; import config from '../../config'; import css from './StripePaymentForm.css'; @@ -149,9 +149,9 @@ class StripePaymentForm extends Component { {this.state.error ? {this.state.error} : null}
{paymentInfo ?

{paymentInfo}

: null} - +
);