Commit 07cb5fe4 authored by Darrick Yong's avatar Darrick Yong

add actions and utils

parent b5eeb0ed
......@@ -9,10 +9,10 @@ const receiveOrders = (payload) => ({
payload,
})
const receiveOrder = (order) => ({
type: RECEIVE_ORDER,
order,
})
// const receiveOrder = (order) => ({
// type: RECEIVE_ORDER,
// order,
// })
export const fetchOrders = () => (dispatch) => {
OrderAPIUtil.getOrders()
......
......@@ -11,7 +11,7 @@ const OrderIndex = ({ orders, fetchOrders }) => {
setFetchAttempted(true);
fetchOrders();
}
}, [ ])
}, [fetchOrders, fetchAttempted])
return (
<div>
......
import axios from 'axios';
// import axios from 'axios';
const sampleRes = {
allIds: ["1", "2", "3"],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment