| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
 | import * as types from './actionTypes';
export const fetchAction = items => ({
  type: types.FETCH_CONTACT_DATA,
  items,
});
export const showDetailAction = item => ({
  type: types.SHOW_DETAIL_CONTACT,
  item,
});
export const hideDetailAction = {
  type: types.HIDE_DETAIL,
};
export const submitAction = (newData, avatar) => ({
  type: types.SUBMIT_CONTACT,
  newData,
  avatar
});
export const addAction = {
  type: types.ADD_CONTACT,
};
export const editAction = item => ({
  type: types.EDIT_CONTACT,
  item,
});
export const searchAction = keyword => ({
  type: types.SEARCH_CONTACT,
  keyword,
});
export const removeAction = item => ({
  type: types.DELETE_CONTACT,
  item,
});
export const closeAction = {
  type: types.CLOSE_CONTACT_FORM,
};
export const addToFavoriteAction = item => ({
  type: types.TOGGLE_FAVORITE,
  item,
});
export const closeNotifAction = {
  type: types.CLOSE_NOTIF
};
 |