From ee97976fb9d4c22bc2d61627a0c4f14b51786f9d Mon Sep 17 00:00:00 2001 From: k2maan Date: Thu, 12 Oct 2023 12:48:28 +0530 Subject: [PATCH] FIxed: cleared userStore state on logout --- src/store/modules/user/actions.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/store/modules/user/actions.ts b/src/store/modules/user/actions.ts index 3e2c7cf30..7c6c8f260 100644 --- a/src/store/modules/user/actions.ts +++ b/src/store/modules/user/actions.ts @@ -25,7 +25,7 @@ import { resetPermissions, setPermissions } from '@/authorization' -import { useAuthStore, translate } from '@hotwax/dxp-components' +import { translate, useAuthStore, useUserStore } from '@hotwax/dxp-components' import { generateDeviceId, generateTopicName } from '@/utils/firebase' import emitter from '@/event-bus' @@ -143,6 +143,7 @@ const actions: ActionTree = { } const authStore = useAuthStore() + const userStore = useUserStore() // TODO add any other tasks if need dispatch("product/clearProducts", null, { root: true }) dispatch('clearNotificationState') @@ -153,6 +154,7 @@ const actions: ActionTree = { // reset plugin state on logout authStore.$reset() + userStore.$reset() // If we get any url in logout api resp then we will redirect the user to the url if(redirectionUrl) {