From add7267f710736daf260c7429cd7708aac565021 Mon Sep 17 00:00:00 2001 From: k2maan Date: Thu, 12 Oct 2023 17:53:09 +0530 Subject: [PATCH] Improved: removed unused state, getters and mutation for locale --- src/store/modules/user/UserState.ts | 1 - src/store/modules/user/getters.ts | 3 --- src/store/modules/user/index.ts | 3 +-- src/store/modules/user/mutation-types.ts | 3 +-- src/store/modules/user/mutations.ts | 5 +---- 5 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/store/modules/user/UserState.ts b/src/store/modules/user/UserState.ts index b0baa46c..b11093d1 100644 --- a/src/store/modules/user/UserState.ts +++ b/src/store/modules/user/UserState.ts @@ -16,5 +16,4 @@ export default interface UserState { name: string; value: object; }; - locale: string; } \ No newline at end of file diff --git a/src/store/modules/user/getters.ts b/src/store/modules/user/getters.ts index 2faa1c29..58fa9f77 100644 --- a/src/store/modules/user/getters.ts +++ b/src/store/modules/user/getters.ts @@ -45,9 +45,6 @@ const getters: GetterTree = { }, getCurrentMapping(state) { return JSON.parse(JSON.stringify(state.currentMapping)) - }, - getLocale (state) { - return state.locale; } } export default getters; \ No newline at end of file diff --git a/src/store/modules/user/index.ts b/src/store/modules/user/index.ts index 74c61105..c2e33d02 100644 --- a/src/store/modules/user/index.ts +++ b/src/store/modules/user/index.ts @@ -24,8 +24,7 @@ const userModule: Module = { mappingType: '', name: '', value: {} - }, - locale: 'en' + } }, getters, actions, diff --git a/src/store/modules/user/mutation-types.ts b/src/store/modules/user/mutation-types.ts index 74b2bec8..9e419742 100644 --- a/src/store/modules/user/mutation-types.ts +++ b/src/store/modules/user/mutation-types.ts @@ -9,5 +9,4 @@ export const USER_PREFERENCE_UPDATED = SN_USER + '/PREFERENCE_UPDATED' export const USER_PERMISSIONS_UPDATED = SN_USER + '/PERMISSIONS_UPDATED' export const USER_CURRENT_FIELD_MAPPING_UPDATED = SN_USER + '/_CURRENT_FIELD_MAPPING_UPDATED' export const USER_FIELD_MAPPINGS_UPDATED = SN_USER + '/FIELD_MAPPINGS_UPDATED' -export const USER_FIELD_MAPPING_CREATED = SN_USER + '/FIELD_MAPPING_CREATED' -export const USER_LOCALE_UPDATED = SN_USER + '/LOCALE_UPDATED' \ No newline at end of file +export const USER_FIELD_MAPPING_CREATED = SN_USER + '/FIELD_MAPPING_CREATED' \ No newline at end of file diff --git a/src/store/modules/user/mutations.ts b/src/store/modules/user/mutations.ts index 6e7762fc..130ca360 100644 --- a/src/store/modules/user/mutations.ts +++ b/src/store/modules/user/mutations.ts @@ -42,9 +42,6 @@ const mutations: MutationTree = { name: payload.name, value: payload.value }; - }, - [types.USER_LOCALE_UPDATED] (state, payload) { - state.locale = payload; - }, + } } export default mutations; \ No newline at end of file