Skip to content

Commit 403ec35

Browse files
authored
Merge pull request #237 from w3bdesign/dev
Upgrade Nuxt to 2.15
2 parents e6f23a6 + 5b23457 commit 403ec35

24 files changed

+3521
-814
lines changed

components/Cart/ShowCartContents.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable no-console */
22
<template>
33
<div>
4-
<LoadingSpinner v-if="loading" />
4+
<SpinnerLoadingSpinner v-if="loading" />
55
<div>
66
<h1 class="h-10 p-6 text-3xl font-bold text-center">Cart</h1>
77
<section class="mt-10">
@@ -42,7 +42,7 @@
4242
<h2 v-if="!cartProducts.length" class="m-4 text-3xl text-center">
4343
Cart is currently empty
4444
</h2>
45-
<CheckoutButton v-if="displayRemove && cartProducts.length" />
45+
<CartCheckoutButton v-if="displayRemove && cartProducts.length" />
4646
</div>
4747
</div>
4848
</template>

components/Category/ShowProductsInCategory.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
{{ products.name }}
66
</h1>
77
<br />
8-
<ShowAllProducts :products="products.products.nodes" />
8+
<ProductsShowAllProducts :products="products.products.nodes" />
99
<div v-if="noProducts" class="mt-10">
1010
<h2 class="h-10 text-2xl font-bold text-center">
1111
No products to display
1212
</h2>
1313
</div>
1414
</div>
15-
<div v-else><LoadingSpinner /></div>
15+
<div v-else><SpinnerLoadingSpinner /></div>
1616
</div>
1717
</template>
1818

File renamed without changes.
File renamed without changes.
File renamed without changes.

components/Header/Navbar.vue renamed to components/Layout/Navbar.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
/>
1616
</div>
1717
</div>
18-
<MobileMenu />
18+
<LayoutMobileMenu />
1919
<div class="hidden lg:w-1/12 lg:block"></div>
2020
<div
2121
id="nav-content"
@@ -76,7 +76,7 @@
7676
<li
7777
class="inline-block py-2 text-xl font-semibold no-underline lg:text-base lg:px-4"
7878
>
79-
<Cart class="-mr-4" />
79+
<LayoutCart class="-mr-4" />
8080
</li>
8181
</ul>
8282
</nav>
File renamed without changes.

components/Checkout/CheckoutForm.vue renamed to components/Order/CheckoutForm.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
</div>
8686
</div>
8787
</div>
88-
<SubmitOrderButton :success="success" :loading="loading" />
88+
<OrderSubmitOrderButton :success="success" :loading="loading" />
8989
</section>
9090
</FormulateForm>
9191
</div>
@@ -114,7 +114,6 @@ export default {
114114
async submitOrder() {
115115
this.loading = true
116116
const order = this.formData
117-
118117
const checkoutData = {
119118
clientMutationId: uid(),
120119
billing: {

components/Checkout/SubmitOrderButton.vue renamed to components/Order/SubmitOrderButton.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
<script>
3030
export default {
31+
name: 'SubmitOrderButton',
3132
props: {
3233
loading: { type: Boolean, required: false, default: false },
3334
success: { type: Boolean, required: false, default: false },
@@ -39,6 +40,6 @@ export default {
3940
/*
4041
button {
4142
@apply w-48 h-12 px-4 py-2 mt-12 font-bold text-white bg-blue-500 rounded hover:bg-blue-800;
42-
}
43+
}
4344
*/
4445
</style>

components/Products/ShowAllProducts.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
<script>
5151
export default {
52-
name: 'ShowProducts',
52+
name: 'ShowAllProducts',
5353
props: {
5454
products: { type: Array, required: true },
5555
},

components/Products/ShowSingleProduct.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,11 @@
5151
</select>
5252
</p>
5353
<div class="pt-1 mt-2">
54-
<AddToCartButton v-if="product.variations" :product="product" />
55-
<AddToCartButton v-else :product="product" />
54+
<CartAddToCartButton
55+
v-if="product.variations"
56+
:product="product"
57+
/>
58+
<CartAddToCartButton v-else :product="product" />
5659
</div>
5760
</div>
5861
</div>

components/Spinner/LoadingSpinner.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,9 @@
55
</h1>
66
</div>
77
</template>
8+
9+
<script>
10+
export default {
11+
name: 'LoadingSpinner',
12+
}
13+
</script>

layouts/Layout.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<template>
22
<div>
3-
<Navbar />
3+
<LayoutNavbar />
44
<Nuxt class="container p-4 mx-auto" />
5-
<Footer />
5+
<LayoutFooter />
66
</div>
77
</template>
88

nuxt.config.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,16 @@ export default {
3333

3434
// Auto import components (https://go.nuxtjs.dev/config-components)
3535
components: true,
36+
/* components: [
37+
'~/components/Cart',
38+
'~/components/Category',
39+
'~/components/Checkout',
40+
'~/components/Footer',
41+
'~/components/Header',
42+
'~/components/Index',
43+
'~/components/Products',
44+
'~/components/Spinner',
45+
], */
3646

3747
// Modules for dev and build (recommended) (https://go.nuxtjs.dev/config-modules)
3848
buildModules: [

0 commit comments

Comments
 (0)