Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export const initProducts = (address, page, limit) => {
- return dispatch => {
- dispatch(fetchProductsStart());
- axiosInstance.get(`/product/all?address=${address}&page=${page}&limit=${limit}&categoryId=&producerId`)
- .then(response => {
- const products = response.data;
- dispatch(fetchProductsSuccess(products))
- })
- .catch(error => {
- console.log("Error: ", error)
- dispatch(fetchProductsFailed(error))
- });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement