Use mapState instead of a getter

This commit is contained in:
Filipa Lacerda 2018-03-13 09:25:39 +00:00
parent 939c87233e
commit 93c6842fbf
No known key found for this signature in database
GPG Key ID: 9CA3FDE4D1E2F1C8
2 changed files with 3 additions and 2 deletions

View File

@ -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() {

View File

@ -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];