Skip to content

Commit 6c07f18

Browse files
committed
We can now place orders remotely through GraphQL
Currently only bank transfer orders
1 parent 29a377f commit 6c07f18

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

components/Checkout/CheckoutForm.component.jsx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ 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 Payment from './Payment.component';
66

77
import { GET_CART } from 'utils/const/GQL_QUERIES';
88
import { CHECKOUT_MUTATION } from 'utils/const/GQL_MUTATIONS';
@@ -106,12 +106,10 @@ const CheckoutForm = () => {
106106
<h2 className="">Betalingsdetaljer</h2>
107107
<Billing input={input} handleOnChange={handleOnChange} />
108108
</div>
109-
110109
{/*Payment*/}
111110
<div className="">
112-
<Payment input={ input } handleOnChange={ handleOnChange }/>
113-
</div>
114-
111+
<Payment input={input} handleOnChange={handleOnChange} />
112+
</div>
115113
<div>
116114
<button
117115
className="px-4 py-2 font-bold bg-white border border-gray-400 border-solid rounded hover:bg-gray-400"
@@ -120,14 +118,14 @@ const CheckoutForm = () => {
120118
BESTILL
121119
</button>
122120
</div>
123-
121+
//TODO Add error handling here
124122
{/* Checkout Loading*/}
125123
{
126-
//checkoutLoading && <p>Behandler ordre ...</p>
124+
//checkoutLoading && <p>Behandler ordre ...</p>
127125
}
128126
{
129-
//requestError && <p>Feilmelding: {requestError} </p>
130-
}
127+
//requestError && <p>Feilmelding: {requestError} </p>
128+
}
131129
</div>
132130
</form>
133131
) : (

0 commit comments

Comments
 (0)