Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions apollo/queries/GET_SINGLE_PRODUCT_QUERY.gql
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ query Product($id: ID!) {
averageRating
slug
description
onSale
image {
databaseId
uri
Expand All @@ -14,10 +15,14 @@ query Product($id: ID!) {
name
... on SimpleProduct {
price
salePrice
regularPrice
databaseId
}
... on VariableProduct {
price
salePrice
regularPrice
databaseId
paColors {
nodes {
Expand Down
3 changes: 0 additions & 3 deletions components/Cart/ShowCartContents.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ export default {
query: GET_CART_QUERY,
result({ data, loading, networkStatus }) {
const cartIsReady = data && networkStatus === 7

if (cartIsReady && !loading) {
this.loading = false
this.remoteCart = data
Expand All @@ -101,13 +100,11 @@ export default {
methods: {
async handleRemoveProduct(products) {
this.removingCartItem = true

const updatedItems = []
updatedItems.push({
key: products.key,
quantity: 0,
})

try {
await this.$apollo
.mutate({
Expand Down
6 changes: 0 additions & 6 deletions components/Products/ShowSingleProduct.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@
:alt="product.name"
:src="process.env.placeholderSmallImage"
/>

<div class="ml-8">
<p class="text-3xl font-bold text-left">{{ product.name }}</p>

<div v-if="product.onSale" class="flex">
<p class="pt-1 mt-4 text-3xl text-gray-900">
{{ product.salePrice }}
Expand All @@ -32,16 +30,13 @@
{{ product.regularPrice }}
</p>
</div>

<p v-else class="pt-1 mt-4 text-2xl text-gray-900">
{{ product.price }}
</p>

<br />
<p class="pt-1 mt-4 text-2xl text-gray-900">
{{ stripHTML(product.description) }}
</p>

<p
v-if="product.variations"
class="pt-1 mt-4 text-xl text-gray-900"
Expand All @@ -55,7 +50,6 @@
VARIATION
</select>
</p>

<div class="pt-1 mt-2">
<AddToCartButton v-if="product.variations" :product="product" />
<AddToCartButton v-else :product="product" />
Expand Down
111 changes: 63 additions & 48 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"graphql-tag": "^2.11.0",
"nuxt": "^2.14.12",
"swiper": "^6.4.11",
"tailwindcss": "npm:@tailwindcss/postcss7-compat@2.0.2",
"tailwindcss": "npm:@tailwindcss/postcss7-compat@2.0.3",
"uid": "^2.0.0",
"vue": "^2.6.12",
"vue-awesome-swiper": "^4.1.1",
Expand All @@ -41,7 +41,7 @@
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "^10.1.0",
"babel-jest": "^26.6.3",
"eslint": "^7.19.0",
"eslint": "^7.20.0",
"eslint-config-prettier": "^7.2.0",
"eslint-loader": "^4.0.2",
"eslint-plugin-nuxt": "^2.0.0",
Expand Down