Skip to content

Commit 3531638

Browse files
committed
Style mobilecart
It was showing a shadow and border when the cart was empty
1 parent 5f73487 commit 3531638

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

components/Cart/AddToCartButton.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ export default {
4242
methods: {
4343
async addProductToWooCart(product) {
4444
const productId = product.databaseId ? product.databaseId : product
45-
4645
const productQueryInput = {
4746
productId,
4847
}
@@ -56,6 +55,7 @@ export default {
5655
.then(({ data }) => {
5756
this.loading = false
5857
this.$apollo.queries.cart.refetch()
58+
this.$router.push('/cart')
5959
})
6060
} catch (e) {
6161
this.error = e

components/Header/MobileMenu.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
Categories
2323
</NuxtLink>
2424
</li>
25-
<li class="flex justify-center mt-4 text-lg linkStyle">
25+
<li class="flex justify-center mt-6 text-lg linkStyleCart">
2626
<NuxtLink to="/cart" @click.native="displayMobileMenu">
2727
<Cart />
2828
</NuxtLink>
@@ -73,6 +73,10 @@ export default {
7373
@apply w-auto p-4 m-4 font-bold text-center border border-gray-300 border-opacity-50 shadow-md rounded;
7474
}
7575
76+
.linkStyleCart {
77+
@apply w-auto p-4 m-4 font-bold text-center;
78+
}
79+
7680
/* Main hamburger styling */
7781
.burger {
7882
height: 3em;

0 commit comments

Comments
 (0)