Skip to content

Commit 7f07179

Browse files
authored
Merge pull request #165 from w3bdesign/development
Development
2 parents 7a6916c + 4c41b11 commit 7f07179

File tree

5 files changed

+6
-26
lines changed

5 files changed

+6
-26
lines changed

components/Cart/AddToCartButton.component.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ const AddToCartButton = (props) => {
8686
<button
8787
onClick={handleAddToCartClick}
8888
className={`px-4 py-2 font-bold bg-white border border-gray-400 border-solid rounded hover:bg-gray-400 ${
89-
addToCartLoading && `animate__animated animate__fadeOut`} ${showAddToCart && `animate__animated animate__fadeIn` }`}
89+
addToCartLoading && `animate__animated animate__fadeOutUp`} ${showAddToCart && `animate__animated animate__fadeInDown` }`}
9090
>
9191
KJØP
9292
</button>

components/Cart/Cart.component.jsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useState, useContext } from 'react';
1+
import { useContext } from 'react';
22

33
import Link from 'next/link';
44

@@ -9,8 +9,7 @@ import { AppContext } from 'utils/context/AppContext';
99
* Currently only displays a sample cart.
1010
* Displays amount of items in cart.
1111
*/
12-
const Cart = () => {
13-
const [isExpanded, setisExpanded] = useState(false);
12+
const Cart = () => {
1413
const [cart, setCart] = useContext(AppContext);
1514

1615
const productsCount =

components/Checkout/Billing.component.jsx

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,13 @@
11
import Error from './Error.component';
22
import CheckoutTitle from 'components/Header/CheckoutTitle.component';
33

4-
5-
64
const Billing = ({ input, handleOnChange }) => {
5+
// https://react-hook-form.com/get-started#Quickstart
76
return (
87
<>
9-
{
10-
// https://tailwindcss.com/components/forms/#
11-
// https://react-hook-form.com/get-started#Quickstart
12-
}
13-
148
<section className="relative text-gray-700 body-font">
159
<div className="container px-5 py-2 mx-auto">
16-
17-
<CheckoutTitle title="Betalingsdetaljer" />
18-
10+
<CheckoutTitle title="Betalingsdetaljer" />
1911
<div className="mx-auto lg:w-1/2 md:w-2/3">
2012
<div className="flex flex-wrap -m-2">
2113
<div className="w-1/2 p-2">
@@ -44,7 +36,6 @@ const Billing = ({ input, handleOnChange }) => {
4436
/>
4537
<Error errors={input.errors} fieldName={'lastName'} />
4638
</div>
47-
4839
<div className="w-1/2 p-2">
4940
<label className="pb-4">Adresse</label>
5041
<input
@@ -58,7 +49,6 @@ const Billing = ({ input, handleOnChange }) => {
5849
/>
5950
<Error errors={input.errors} fieldName={'address1'} />
6051
</div>
61-
6252
<div className="w-1/2 p-2">
6353
<label className="pb-4">Postnummer</label>
6454
<input
@@ -72,7 +62,6 @@ const Billing = ({ input, handleOnChange }) => {
7262
/>
7363
<Error errors={input.errors} fieldName={'postcode'} />
7464
</div>
75-
7665
<div className="w-1/2 p-2">
7766
<label className="pb-4">Sted</label>
7867
<input
@@ -86,7 +75,6 @@ const Billing = ({ input, handleOnChange }) => {
8675
/>
8776
<Error errors={input.errors} fieldName={'city'} />
8877
</div>
89-
9078
<div className="w-1/2 p-2">
9179
<label className="pb-4">Epost</label>
9280
<input
@@ -100,7 +88,6 @@ const Billing = ({ input, handleOnChange }) => {
10088
/>
10189
<Error errors={input.errors} fieldName={'email'} />
10290
</div>
103-
10491
<div className="w-1/2 p-2">
10592
<label className="pb-4">Telefon</label>
10693
<input
@@ -114,7 +101,6 @@ const Billing = ({ input, handleOnChange }) => {
114101
/>
115102
<Error errors={input.errors} fieldName={'phone'} />
116103
</div>
117-
118104
<div className="w-1/2 p-2">
119105
<input
120106
className="hidden"
@@ -124,7 +110,6 @@ const Billing = ({ input, handleOnChange }) => {
124110
checked
125111
/>
126112
</div>
127-
128113
<div className="w-full p-2">
129114
<button className="flex px-4 py-2 mx-auto font-bold bg-white border border-gray-400 border-solid rounded hover:bg-gray-400">
130115
BESTILL

components/Checkout/CheckoutForm.component.jsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,23 +106,19 @@ const CheckoutForm = () => {
106106
<form onSubmit={handleFormSubmit} className="">
107107
<div className="container mx-auto">
108108
{/* Order*/}
109-
110109
<OrderDetails cart={cart} />
111110
{/*Payment Details*/}
112111
<div className="">
113112
<Billing input={input} handleOnChange={handleOnChange} />
114113
</div>
115-
116114
{/* Checkout Loading*/}
117-
118115
{checkoutLoading && (
119116
<div className="text-xl text-center">
120117
Behandler ordre, vennligst vent ...
121118
<br />
122119
<LoadingSpinner />
123120
</div>
124121
)}
125-
126122
{requestError}
127123
</div>
128124
</form>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nextjs-woocommerce",
3-
"version": "0.2.5",
3+
"version": "0.8.5",
44
"description": "",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)