summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/static_site_editor/store/mutations.js
blob: 88cb74d2b115ed49783656a5e43a22310f704c71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import * as types from './mutation_types';

export default {
  [types.LOAD_CONTENT](state) {
    state.isLoadingContent = true;
  },
  [types.RECEIVE_CONTENT_SUCCESS](state, { title, content }) {
    state.isLoadingContent = false;
    state.title = title;
    state.content = content;
  },
  [types.RECEIVE_CONTENT_ERROR](state) {
    state.isLoadingContent = false;
  },
};