Skip to content

Commit

Permalink
Improved: added support to redirect user to the store details page if…
Browse files Browse the repository at this point in the history
… login with productStoreId as query (user-240)
  • Loading branch information
amansinghbais committed Oct 10, 2024
1 parent 0b5eac6 commit 8476420
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/store/modules/user/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import emitter from "@/event-bus"
import { Settings } from "luxon"
import { useAuthStore } from '@hotwax/dxp-components'
import { resetConfig } from '@/adapter'
import router from '@/router'

const actions: ActionTree<UserState, RootState> = {

Expand Down Expand Up @@ -40,6 +41,11 @@ const actions: ActionTree<UserState, RootState> = {
commit(types.USER_INFO_UPDATED, userProfile);
this.dispatch('util/fetchOrganizationPartyId');
emitter.emit("dismissLoader")

const productStoreId = router.currentRoute.value.query.productStoreId
if(productStoreId) {
return `/product-store-details/${productStoreId}`;
}
} catch (err: any) {
emitter.emit("dismissLoader")
showToast(translate(err));
Expand Down

0 comments on commit 8476420

Please sign in to comment.