summaryrefslogtreecommitdiffstats
path: root/front/odiparpack/app/actions/EcommerceActions.js
blob: 481a031ac9da216b98854059063bdb8aba688c52 (plain)
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
import * as types from './actionTypes';

export const fetchAction = items => ({
  type: types.FETCH_PRODUCT_DATA,
  items,
});

export const searchAction = keyword => ({
  type: types.SEARCH_PRODUCT,
  keyword,
});

export const addAction = item => ({
  type: types.ADD_TO_CART,
  item,
});

export const removeAction = item => ({
  type: types.DELETE_CART_ITEM,
  item,
});

export const checkoutAction = ({
  type: types.CHECKOUT,
});

export const detailAction = item => ({
  type: types.SHOW_DETAIL_PRODUCT,
  item
});

export const closeNotifAction = {
  type: types.CLOSE_NOTIF
};