Skip to content

Commit 3ecbc43

Browse files
committed
Display cart on checkout page
1 parent 6d45cf9 commit 3ecbc43

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

components/Checkout/CheckoutForm.component.jsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import { useState, useContext, useEffect } from 'react';
22
import { useQuery, useMutation } from '@apollo/react-hooks';
33

44
import Billing from './Billing.component';
5-
import Payment from './Payment.component';
5+
import CartItemsContainer from "../Cart/CartPage/CartItemsContainer.component";
6+
//import Payment from './Payment.component';
67

78
import { GET_CART } from 'utils/const/GQL_QUERIES';
89
import { CHECKOUT_MUTATION } from 'utils/const/GQL_MUTATIONS';
@@ -101,14 +102,17 @@ const CheckoutForm = () => {
101102
{cart ? (
102103
<form onSubmit={handleFormSubmit} className="">
103104
<div className="">
105+
{/* Order*/}
106+
<CartItemsContainer cart={cart} />
107+
104108
{/*Payment Details*/}
105109
<div className="">
106110
<Billing input={input} handleOnChange={handleOnChange} />
107111
</div>
108112

109113
{/* Checkout Loading*/}
110-
{checkoutLoading && <p>Behandler ordre ...</p>}
111-
{requestError && <p>Feilmelding: {requestError} </p>}
114+
{checkoutLoading}
115+
{requestError}
112116
</div>
113117
</form>
114118
) : (

0 commit comments

Comments
 (0)