Skip to content

Commit 2b9e351

Browse files
committed
Design tweaks and redirect to cart after product added
1 parent 3531638 commit 2b9e351

File tree

5 files changed

+124
-129
lines changed

5 files changed

+124
-129
lines changed

components/Cart/AddToCartButton.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ export default {
5555
.then(({ data }) => {
5656
this.loading = false
5757
this.$apollo.queries.cart.refetch()
58-
this.$router.push('/cart')
5958
})
6059
} catch (e) {
6160
this.error = e
@@ -64,6 +63,7 @@ export default {
6463
addProductToCart(product) {
6564
this.loading = true
6665
this.addProductToWooCart(product)
66+
this.$router.push('/cart')
6767
},
6868
},
6969
}

components/Header/Navbar.vue

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,17 @@
22
<div>
33
<header
44
role="banner"
5-
class="container flex flex-col justify-center px-0 pt-6 mx-0 mx-auto mb-6"
5+
class="container flex flex-col justify-center px-0 pt-6 mx-auto mb-6"
66
>
77
<div class="flex flex-wrap lg:px-4">
88
<div class="w-9/12 pr-2 my-2 overflow-hidden lg:w-3/12 md:w-10/12">
99
<div class="ml-4 lg:ml-0">
10-
<NuxtLink to="/">
11-
<img
12-
alt="Logo"
13-
class="h-24"
14-
aria-label="Nettbutikk logo"
15-
src="~/assets/Logo.svg"
16-
/>
17-
</NuxtLink>
10+
<img
11+
alt="Logo"
12+
class="h-20 lg:h-24"
13+
aria-label="Nettbutikk logo"
14+
src="~/assets/Logo.svg"
15+
/>
1816
</div>
1917
</div>
2018
<MobileMenu />

components/Index/Hero.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ export default {
2525
#hero {
2626
background-image: url('~assets/Hero.jpg');
2727
height: 24rem;
28-
max-width: 1376px;
28+
max-width: 1350px;
2929
}
3030
</style>

0 commit comments

Comments
 (0)