We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1e7d9b2 + 2ab6288 commit 9f7e0aeCopy full SHA for 9f7e0ae
components/Header/Cart.vue
@@ -1,6 +1,11 @@
1
<template>
2
<div>
3
- <div v-if="!remoteError">
+ <div v-if="remoteError">
4
+ <span class="text-xl text-red-500"
5
+ >Error fetching cart. Please refresh the page.</span
6
+ >
7
+ </div>
8
+ <div v-else>
9
<NuxtLink to="/cart">
10
<transition name="cart">
11
<span
@@ -71,7 +76,7 @@ export default {
71
76
// Check if we are in the browser before checking localStorage
72
77
// Will refresh the page to refetch the session from WooCommerce
73
78
if (process.browser && !localStorage.getItem('woo-session')) {
74
- window.location.reload(true)
79
+ this.$router.push('/')
75
80
}
81
},
82
0 commit comments