ilink-world/redux/actions/NanoCreditAction.js

55 lines
1.5 KiB
JavaScript

import { CREATE_GROUP_PENDING, CREATE_GROUP_SUCCESS, CREATE_GROUP_ERROR, CREATE_GROUP_RESET, GET_DEMAND_GROUP_PENDING, GET_DEMAND_GROUP_SUCCESS, GET_DEMAND_GROUP_ERROR, GET_DEMAND_GROUP_RESET, GET_UNIQUE_DEMAND_GROUP_PENDING, GET_UNIQUE_DEMAND_GROUP_RESET } from "../types/NanoCreditType";
export const fetchCreateGroupPending = () => ({
type: CREATE_GROUP_PENDING
});
export const fetchCreateGroupSuccess = (res) => ({
type: CREATE_GROUP_SUCCESS,
result: res,
});
export const fetchCreateGroupError = (error) => ({
type: CREATE_GROUP_ERROR,
result: error
});
export const fetchCreateGroupReset = () => ({
type: CREATE_GROUP_RESET
});
export const fetchGetDemandsGroupPending = () => ({
type: GET_DEMAND_GROUP_PENDING
});
export const fetchGetDemandsGroupSuccess = (res) => ({
type: GET_DEMAND_GROUP_SUCCESS,
result: res,
});
export const fetchGetDemandsGroupError = (error) => ({
type: GET_DEMAND_GROUP_ERROR,
result: error
});
export const fetchGetDemandsGroupReset = () => ({
type: GET_DEMAND_GROUP_RESET
});
export const fetchGetUniqueDemandsGroupPending = () => ({
type: GET_UNIQUE_DEMAND_GROUP_PENDING
});
export const fetchGetUniqueDemandsGroupSuccess = (res) => ({
type: GET_UNIQUE_DEMAND_GROUP_SUCCESS,
result: res,
});
export const fetchGetUniqueDemandsGroupError = (error) => ({
type: GET_UNIQUE_DEMAND_GROUP_ERROR,
result: error
});
export const fetchGetUniqueDemandsGroupReset = () => ({
type: GET_UNIQUE_DEMAND_GROUP_RESET
});