Skip to content

Commit 3159c19

Browse files
committed
Finetune design
Had to finetune design after Tailwind CSS upgrade
1 parent d79a4e8 commit 3159c19

11 files changed

+30
-49
lines changed

components/Cart/CartPage/CartItemsContainer.component.jsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ import { AppContext } from 'utils/context/AppContext';
77
import {
88
getFormattedCart,
99
getUpdatedItems,
10-
} from '../../../utils/functions/functions';
10+
} from 'utils/functions/functions';
1111

12-
import PageTitle from 'components/Title/PageTitle.component';
1312
import RegularCart from './RegularCart.component';
1413
import MobileCart from './MobileCart.component';
1514
import LoadingSpinner from 'components/LoadingSpinner/LoadingSpinner.component';
@@ -75,7 +74,7 @@ const CartItemsContainer = () => {
7574
// Update cart data in React Context.
7675
setCart(updatedCart);
7776
},
78-
onError: (error) => {
77+
onError: (error) => {
7978
setRequestError(error);
8079
},
8180
});
@@ -85,7 +84,6 @@ const CartItemsContainer = () => {
8584
<div className="container flex flex-wrap items-center mx-auto">
8685
{cart ? (
8786
<div className="p-6 mx-auto mt-5">
88-
<PageTitle title="Handlekurv" />
8987
<RegularCart
9088
cart={cart}
9189
updateCartProcessing={updateCartProcessing}

components/Cart/CartPage/MobileCart.component.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ const MobileCart = ({ cart, handleRemoveProductClick, updateCart }) => {
77
<section className="bg-white md:hidden lg:hidden xl:hidden">
88
<div className="flex items-center justify-center">
99
<div className="container">
10-
<table className="flex flex-row flex-no-wrap mx-auto my-5 overflow-hidden rounded-lg sm:bg-white sm:shadow-lg">
10+
<table className="flex flex-row flex-no-wrap mx-auto my-5 overflow-hidden ">
1111
<thead className="text-black">
1212
{cart.products.length &&
1313
cart.products.map(() => (
1414
<tr
1515
key={v4()}
16-
className="flex flex-col mb-2 bg-white rounded-l-lg flex-no wrap sm:table-row sm:rounded-none sm:mb-0"
16+
className="flex flex-col mb-2 bg-white border border-gray-300 rounded-l-lg flex-no wrap sm:table-row sm:rounded-none sm:mb-0"
1717
>
1818
<th className="p-3 text-left">Fjern</th>
1919
<th className="p-3 text-left">Navn</th>

components/Cart/CartPage/MobileCartItem.component.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const MobileCartItem = ({
4848

4949
return (
5050
<>
51-
<tr className="flex flex-col mb-2 flex-no wrap sm:table-row sm:mb-0">
51+
<tr className="flex flex-col mb-2 border border-gray-300 sm:mb-0">
5252
<td className="h-12 p-3">
5353
<SVGX
5454
cartKey={item.cartKey}

components/Checkout/Billing.component.jsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import { useForm } from 'react-hook-form';
22

3-
import CheckoutTitle from 'components/Title/CheckoutTitle.component';
4-
53
const Input = ({
64
name,
75
label,
@@ -34,8 +32,7 @@ const Billing = ({ onSubmit }) => {
3432
<>
3533
<section className="text-gray-700">
3634
<form onSubmit={handleSubmit(onSubmit)}>
37-
<div className="container p-4 py-2 mx-auto">
38-
<CheckoutTitle title="Betalingsdetaljer" />
35+
<div className="container p-4 py-2 mx-auto">
3936
<div className="mx-auto lg:w-1/2 md:w-2/3">
4037
<div className="flex flex-wrap -m-2">
4138
<div className="w-1/2 p-2">

components/Checkout/MobileOrderDetails.component.jsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
import { v4 } from 'uuid';
22

33
import MobileOrderDetailsItem from './MobileOrderDetailsItem.component';
4-
import CheckoutTitle from 'components/Title/CheckoutTitle.component';
54

65
const MobileOrderDetails = ({ cart }) => {
76
return (
87
<section className="block py-8 bg-white lg:hidden xl:hidden md:hidden">
98
<div className="flex items-center justify-center">
109
<div className="p-6 mx-auto mt-5">
11-
<CheckoutTitle title="Din Ordre" />
1210
<table className="flex flex-row flex-no-wrap mx-auto my-5 overflow-hidden rounded-lg sm:bg-white sm:shadow-lg">
1311
<thead className="text-black">
1412
{cart.products.length &&

components/Checkout/OrderDetails.component.jsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import CheckoutTitle from 'components/Title/CheckoutTitle.component';
21
import OrderDetailsCartItem from './OrderDetailsCartItem.component';
32

43
const OrderDetails = ({ cart }) => {
@@ -8,7 +7,6 @@ const OrderDetails = ({ cart }) => {
87
<div className="container flex flex-wrap items-center mx-auto">
98
{cart ? (
109
<div className="p-6 mx-auto mt-5">
11-
<CheckoutTitle title="Din Ordre" />
1210
<table className="table-auto">
1311
<thead>
1412
<tr>

components/Index/Hero.component.jsx

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,26 @@
44
const Hero = () => {
55
return (
66
<>
7-
8-
<section
9-
id="hero"
10-
className="flex w-full pt-12 mx-auto mt-40 bg-right bg-cover md:pt-0 md:items-center"
11-
>
12-
<div className="container mx-auto">
13-
<div className="flex flex-col items-start justify-center w-full px-6 tracking-wide lg:w-1/2">
14-
<h1 className="p-4 my-4 text-2xl text-white bg-black rounded-lg">
15-
Stripete Zig Zag Pute Sett
16-
</h1>
7+
<section
8+
id="hero"
9+
className="flex w-full pt-10 mx-auto bg-right bg-cover mt-36 md:pt-0 md:items-center"
10+
>
11+
<div className="container mx-auto">
12+
<div className="flex flex-col items-start justify-center w-full px-6 tracking-wide lg:w-1/2">
13+
<h1 className="p-4 my-4 text-2xl text-white bg-black rounded-lg">
14+
Stripete Zig Zag Pute Sett
15+
</h1>
1716

18-
<a
19-
className="inline-block px-6 py-3 text-xl leading-relaxed text-white uppercase bg-black rounded-lg hover:underline"
20-
href="#"
21-
>
22-
se utvalget
23-
</a>
17+
<a
18+
className="inline-block px-6 py-3 text-xl leading-relaxed text-white uppercase bg-black rounded-lg hover:underline"
19+
href="#"
20+
>
21+
se utvalget
22+
</a>
23+
</div>
2424
</div>
25-
</div>
26-
</section>
27-
</>
28-
25+
</section>
26+
</>
2927
);
3028
};
3129

components/Title/CheckoutTitle.component.jsx

Lines changed: 0 additions & 13 deletions
This file was deleted.

pages/handlekurv.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import Header from 'components/Header/Header.component';
22
import CartItemsContainer from 'components/Cart/CartPage/CartItemsContainer.component';
3+
import PageTitle from 'components/Title/PageTitle.component';
34

45
const Handlekurv = () => {
56
return (
67
<>
78
<Header title="- Handlekurv" />
9+
<PageTitle title="Handlekurv" />
810
<CartItemsContainer />
911
</>
1012
);

pages/kasse.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import Header from 'components/Header/Header.component';
22
import CheckoutForm from 'components/Checkout/CheckoutForm.component';
3+
import PageTitle from 'components/Title/PageTitle.component';
34

45
const Kasse = () => (
56
<>
67
<Header title="- Gå til kasse" />
8+
<PageTitle title="Din ordre" />
79
<CheckoutForm />
810
</>
911
);

0 commit comments

Comments
 (0)