Skip to content

Commit

Permalink
Improved: removed unused state, getters and mutation for locale
Browse files Browse the repository at this point in the history
  • Loading branch information
k2maan committed Oct 12, 2023
1 parent 2857a41 commit add7267
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 12 deletions.
1 change: 0 additions & 1 deletion src/store/modules/user/UserState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@ export default interface UserState {
name: string;
value: object;
};
locale: string;
}
3 changes: 0 additions & 3 deletions src/store/modules/user/getters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ const getters: GetterTree <UserState, RootState> = {
},
getCurrentMapping(state) {
return JSON.parse(JSON.stringify(state.currentMapping))
},
getLocale (state) {
return state.locale;
}
}
export default getters;
3 changes: 1 addition & 2 deletions src/store/modules/user/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ const userModule: Module<UserState, RootState> = {
mappingType: '',
name: '',
value: {}
},
locale: 'en'
}
},
getters,
actions,
Expand Down
3 changes: 1 addition & 2 deletions src/store/modules/user/mutation-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
export const USER_FIELD_MAPPING_CREATED = SN_USER + '/FIELD_MAPPING_CREATED'
5 changes: 1 addition & 4 deletions src/store/modules/user/mutations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ const mutations: MutationTree <UserState> = {
name: payload.name,
value: payload.value
};
},
[types.USER_LOCALE_UPDATED] (state, payload) {
state.locale = payload;
},
}
}
export default mutations;

0 comments on commit add7267

Please sign in to comment.