client/src/actions/groupActions.js
author ymh <ymh.work@gmail.com>
Thu, 03 Aug 2017 09:44:37 +0200
changeset 133 6f3078f7fd47
parent 132 906a6c7c7943
child 134 be36eed5e6e0
permissions -rw-r--r--
Work on correct protocol propagation
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
132
906a6c7c7943 add group to sync + create groups + various component cleaning
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
import * as types from '../constants/actionTypes';
906a6c7c7943 add group to sync + create groups + various component cleaning
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
906a6c7c7943 add group to sync + create groups + various component cleaning
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
906a6c7c7943 add group to sync + create groups + various component cleaning
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
export const groupCreateSuccess = (group) =>
906a6c7c7943 add group to sync + create groups + various component cleaning
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
  ({ type: types.GROUP_CREATE_SUCCESS, group });
906a6c7c7943 add group to sync + create groups + various component cleaning
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
906a6c7c7943 add group to sync + create groups + various component cleaning
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
export const groupCreateError = (error) =>
906a6c7c7943 add group to sync + create groups + various component cleaning
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
  ({ type: types.GROUP_CREATE_ERROR, error });
906a6c7c7943 add group to sync + create groups + various component cleaning
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
906a6c7c7943 add group to sync + create groups + various component cleaning
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
export const groupLoadSucess = (groups) =>
906a6c7c7943 add group to sync + create groups + various component cleaning
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
  ({ type: types.GROUP_LOAD_SUCCESS, groups });
906a6c7c7943 add group to sync + create groups + various component cleaning
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
906a6c7c7943 add group to sync + create groups + various component cleaning
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
export const groupLoadError = (error) =>
906a6c7c7943 add group to sync + create groups + various component cleaning
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
  ({ type: types.GROUP_LOAD_ERROR, error });
906a6c7c7943 add group to sync + create groups + various component cleaning
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
906a6c7c7943 add group to sync + create groups + various component cleaning
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
export const groupLoadAsync = () =>
906a6c7c7943 add group to sync + create groups + various component cleaning
ymh <ymh.work@gmail.com>
parents:
diff changeset
    17
  ({ type: types.GROUP_LOAD_ASYNC });