Commit 93c6842f authored by Filipa Lacerda's avatar Filipa Lacerda

Use mapState instead of a getter

parent 939c8723
<script> <script>
import $ from 'jquery'; import $ from 'jquery';
import { mapActions, mapGetters } from 'vuex'; import { mapActions, mapGetters, mapState } from 'vuex';
import _ from 'underscore'; import _ from 'underscore';
import Autosize from 'autosize'; import Autosize from 'autosize';
import { __, sprintf } from '~/locale'; import { __, sprintf } from '~/locale';
...@@ -52,6 +52,8 @@ ...@@ -52,6 +52,8 @@
'getNoteableData', 'getNoteableData',
'getNotesData', 'getNotesData',
'openState', 'openState',
]),
...mapState([
'isToggleStateButtonLoading', 'isToggleStateButtonLoading',
]), ]),
noteableDisplayName() { noteableDisplayName() {
......
...@@ -9,7 +9,6 @@ export const getNotesDataByProp = state => prop => state.notesData[prop]; ...@@ -9,7 +9,6 @@ export const getNotesDataByProp = state => prop => state.notesData[prop];
export const getNoteableData = state => state.noteableData; export const getNoteableData = state => state.noteableData;
export const getNoteableDataByProp = state => prop => state.noteableData[prop]; export const getNoteableDataByProp = state => prop => state.noteableData[prop];
export const openState = state => state.noteableData.state; export const openState = state => state.noteableData.state;
export const isToggleStateButtonLoading = state => state.isToggleStateButtonLoading;
export const getUserData = state => state.userData || {}; export const getUserData = state => state.userData || {};
export const getUserDataByProp = state => prop => state.userData && state.userData[prop]; export const getUserDataByProp = state => prop => state.userData && state.userData[prop];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment