Use mapState instead of a getter
This commit is contained in:
parent
939c87233e
commit
93c6842fbf
2 changed files with 3 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
<script>
|
||||
import $ from 'jquery';
|
||||
import { mapActions, mapGetters } from 'vuex';
|
||||
import { mapActions, mapGetters, mapState } from 'vuex';
|
||||
import _ from 'underscore';
|
||||
import Autosize from 'autosize';
|
||||
import { __, sprintf } from '~/locale';
|
||||
|
@ -52,6 +52,8 @@
|
|||
'getNoteableData',
|
||||
'getNotesData',
|
||||
'openState',
|
||||
]),
|
||||
...mapState([
|
||||
'isToggleStateButtonLoading',
|
||||
]),
|
||||
noteableDisplayName() {
|
||||
|
|
|
@ -9,7 +9,6 @@ export const getNotesDataByProp = state => prop => state.notesData[prop];
|
|||
export const getNoteableData = state => state.noteableData;
|
||||
export const getNoteableDataByProp = state => prop => state.noteableData[prop];
|
||||
export const openState = state => state.noteableData.state;
|
||||
export const isToggleStateButtonLoading = state => state.isToggleStateButtonLoading;
|
||||
|
||||
export const getUserData = state => state.userData || {};
|
||||
export const getUserDataByProp = state => prop => state.userData && state.userData[prop];
|
||||
|
|
Loading…
Reference in a new issue