Skip to content

Commit

Permalink
Merge pull request #233 from w3bdesign/dev
Browse files Browse the repository at this point in the history
Add message to refresh page if we have an error
  • Loading branch information
w3bdesign authored Feb 13, 2021
2 parents 1e7d9b2 + 2ab6288 commit 9f7e0ae
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions components/Header/Cart.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
<template>
<div>
<div v-if="!remoteError">
<div v-if="remoteError">
<span class="text-xl text-red-500"
>Error fetching cart. Please refresh the page.</span
>
</div>
<div v-else>
<NuxtLink to="/cart">
<transition name="cart">
<span
Expand Down Expand Up @@ -71,7 +76,7 @@ export default {
// Check if we are in the browser before checking localStorage
// Will refresh the page to refetch the session from WooCommerce
if (process.browser && !localStorage.getItem('woo-session')) {
window.location.reload(true)
this.$router.push('/')
}
},
},
Expand Down

1 comment on commit 9f7e0ae

@vercel
Copy link

@vercel vercel bot commented on 9f7e0ae Feb 13, 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.