Skip to content

Commit

Permalink
Merge pull request #237 from w3bdesign/dev
Browse files Browse the repository at this point in the history
Upgrade Nuxt to 2.15
  • Loading branch information
w3bdesign authored Feb 15, 2021
2 parents e6f23a6 + 5b23457 commit 403ec35
Show file tree
Hide file tree
Showing 24 changed files with 3,521 additions and 814 deletions.
4 changes: 2 additions & 2 deletions components/Cart/ShowCartContents.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable no-console */
<template>
<div>
<LoadingSpinner v-if="loading" />
<SpinnerLoadingSpinner v-if="loading" />
<div>
<h1 class="h-10 p-6 text-3xl font-bold text-center">Cart</h1>
<section class="mt-10">
Expand Down Expand Up @@ -42,7 +42,7 @@
<h2 v-if="!cartProducts.length" class="m-4 text-3xl text-center">
Cart is currently empty
</h2>
<CheckoutButton v-if="displayRemove && cartProducts.length" />
<CartCheckoutButton v-if="displayRemove && cartProducts.length" />
</div>
</div>
</template>
Expand Down
4 changes: 2 additions & 2 deletions components/Category/ShowProductsInCategory.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
{{ products.name }}
</h1>
<br />
<ShowAllProducts :products="products.products.nodes" />
<ProductsShowAllProducts :products="products.products.nodes" />
<div v-if="noProducts" class="mt-10">
<h2 class="h-10 text-2xl font-bold text-center">
No products to display
</h2>
</div>
</div>
<div v-else><LoadingSpinner /></div>
<div v-else><SpinnerLoadingSpinner /></div>
</div>
</template>

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions components/Header/Navbar.vue → components/Layout/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/>
</div>
</div>
<MobileMenu />
<LayoutMobileMenu />
<div class="hidden lg:w-1/12 lg:block"></div>
<div
id="nav-content"
Expand Down Expand Up @@ -76,7 +76,7 @@
<li
class="inline-block py-2 text-xl font-semibold no-underline lg:text-base lg:px-4"
>
<Cart class="-mr-4" />
<LayoutCart class="-mr-4" />
</li>
</ul>
</nav>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
</div>
</div>
</div>
<SubmitOrderButton :success="success" :loading="loading" />
<OrderSubmitOrderButton :success="success" :loading="loading" />
</section>
</FormulateForm>
</div>
Expand Down Expand Up @@ -114,7 +114,6 @@ export default {
async submitOrder() {
this.loading = true
const order = this.formData
const checkoutData = {
clientMutationId: uid(),
billing: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

<script>
export default {
name: 'SubmitOrderButton',
props: {
loading: { type: Boolean, required: false, default: false },
success: { type: Boolean, required: false, default: false },
Expand All @@ -39,6 +40,6 @@ export default {
/*
button {
@apply w-48 h-12 px-4 py-2 mt-12 font-bold text-white bg-blue-500 rounded hover:bg-blue-800;
}
}
*/
</style>
2 changes: 1 addition & 1 deletion components/Products/ShowAllProducts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

<script>
export default {
name: 'ShowProducts',
name: 'ShowAllProducts',
props: {
products: { type: Array, required: true },
},
Expand Down
7 changes: 5 additions & 2 deletions components/Products/ShowSingleProduct.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,11 @@
</select>
</p>
<div class="pt-1 mt-2">
<AddToCartButton v-if="product.variations" :product="product" />
<AddToCartButton v-else :product="product" />
<CartAddToCartButton
v-if="product.variations"
:product="product"
/>
<CartAddToCartButton v-else :product="product" />
</div>
</div>
</div>
Expand Down
6 changes: 6 additions & 0 deletions components/Spinner/LoadingSpinner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@
</h1>
</div>
</template>

<script>
export default {
name: 'LoadingSpinner',
}
</script>
4 changes: 2 additions & 2 deletions layouts/Layout.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template>
<div>
<Navbar />
<LayoutNavbar />
<Nuxt class="container p-4 mx-auto" />
<Footer />
<LayoutFooter />
</div>
</template>

Expand Down
10 changes: 10 additions & 0 deletions nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@ export default {

// Auto import components (https://go.nuxtjs.dev/config-components)
components: true,
/* components: [
'~/components/Cart',
'~/components/Category',
'~/components/Checkout',
'~/components/Footer',
'~/components/Header',
'~/components/Index',
'~/components/Products',
'~/components/Spinner',
], */

// Modules for dev and build (recommended) (https://go.nuxtjs.dev/config-modules)
buildModules: [
Expand Down
Loading

1 comment on commit 403ec35

@vercel
Copy link

@vercel vercel bot commented on 403ec35 Feb 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.