user logout issue fixes

This commit is contained in:
user 2023-06-27 18:50:25 +05:30
parent a6145118f7
commit c4a5582030
2 changed files with 8 additions and 4 deletions

View File

@ -151,6 +151,7 @@
</span>
<span v-else>
<v-badge
v-if="cartProductsItem"
class="mb-4"
v-show="cartProductsItem.length"
color="pink"
@ -254,11 +255,12 @@ export default {
categoryList: function () {
return this.$store.state.headerCategoryList.categoryList;
},
// eslint-disable-next-line vue/return-in-computed-property
cartProductsProgress: function () {
if (this.userAuth) {
return this.$store.state.userCartProduct.cartProductsProgress;
} else {
return this.$store.state.cartProduct.cartProductsProgress;
return;
}
},
subMenuItem: {
@ -267,18 +269,20 @@ export default {
},
set: function () {},
},
// eslint-disable-next-line vue/return-in-computed-property
inProgress: function () {
if (this.userAuth) {
return this.$store.state.userCartProduct.inProgress;
} else {
return this.$store.state.cartProduct.inProgress;
return
}
},
// eslint-disable-next-line vue/return-in-computed-property
cartProductsItem() {
if (this.userAuth) {
return this.$store.state.userCartProduct.cartProductList;
} else {
return this.$store.state.cartProduct.cartProductList;
return;
}
},
categoryDetailsList: function () {

View File

@ -34,7 +34,7 @@ export default {
setTimeout(() => {
this.$store.dispatch("auth/logout");
this.$router.push({
name: "HomePage",
name: "LoginPage",
});
}, 5000);
}