From b46a7a6662f7937bb69b5735462ca351ed698187 Mon Sep 17 00:00:00 2001
From: clauspeterhuebner
Date: Wed, 26 Feb 2025 16:20:38 +0100
Subject: [PATCH] add userLocation in store
---
frontend/src/store/store.js | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/frontend/src/store/store.js b/frontend/src/store/store.js
index 1af1fef21..bc17d6956 100644
--- a/frontend/src/store/store.js
+++ b/frontend/src/store/store.js
@@ -72,6 +72,9 @@ export const mutations = {
setDarkMode: (state, darkMode) => {
state.darkMode = !!darkMode
},
+ userLocation: (state, userLocation) => {
+ state.userLocation = userLocation
+ },
redirectPath: (state, redirectPath) => {
state.redirectPath = redirectPath || '/overview'
},
@@ -99,6 +102,7 @@ export const actions = {
commit('hideAmountGDD', data.hideAmountGDD)
commit('hideAmountGDT', data.hideAmountGDT)
commit('setDarkMode', data.darkMode)
+ commit('userLocation', data.userLocation)
},
logout: ({ commit, state }) => {
commit('token', null)
@@ -119,6 +123,7 @@ export const actions = {
commit('hideAmountGDT', true)
commit('email', '')
commit('setDarkMode', false)
+ commit('userLocation', null)
commit('redirectPath', '/overview')
localStorage.clear()
},
@@ -158,6 +163,7 @@ try {
hideAmountGDT: null,
email: '',
darkMode: false,
+ userLocation: null,
redirectPath: '/overview',
transactionToHighlightId: '',
},