Commit 23dfc92f authored by Darrick Yong's avatar Darrick Yong

remove dummy data

parent a3090b84
......@@ -63,7 +63,6 @@ const mapStateToProps = (state) => ({
});
const mapDispatchToProps = (dispatch) => ({
// fetchOrders: () => dispatch(fetchOrders()),
});
export default connect(mapStateToProps, mapDispatchToProps)(Search);
......@@ -4,7 +4,6 @@ import { editOrder } from "../../actions/order_actions";
import Button from "../atoms/Button";
const OrderButtons = ({ order, editOrder }) => {
// const { id, orderId, status, orderItems, createdAt, modifiedAt } = order;
const handleUpdate = (action) => {
console.log(action);
......
import axios from 'axios';
// const RECEIVED = "RECEIVED";
// const FULFILLED = "FULFILLED";
// const CANCELLED = "CANCELLED";
// const sampleGetAll = [
// // allIds: ["1", "2", "3"],
// // byId: {
// {
// id: "1",
// orderId: "o1",
// status: RECEIVED,
// orderItems: [
// {
// itemId: "17",
// itemName: "Apple iPhone",
// itemQuantity: 4,
// itemPrice: 17.99,
// itemSku: 8765309,
// },
// {
// itemId: "Google Pixel",
// itemName: "Item 2",
// itemQuantity: 42,
// itemPrice: 17.99,
// itemSku: 8715309,
// },
// ],
// },
// {
// id: "2",
// orderId: "o2",
// status: RECEIVED,
// orderItems: [
// {
// itemId: "17",
// itemName: "Item 1",
// itemQuantity: 3,
// itemPrice: 17.99,
// itemSku: 8765309,
// },
// {
// itemId: "18",
// itemName: "Item 2",
// itemQuantity: 41,
// itemPrice: 17.99,
// itemSku: 8715309,
// },
// ],
// },
// {
// id: "3",
// orderId: "o3",
// status: RECEIVED,
// orderItems: [
// {
// itemId: "17",
// itemName: "Item 1",
// itemQuantity: 2,
// itemPrice: 17.99,
// itemSku: 8765309,
// },
// {
// itemId: "18",
// itemName: "Item 2",
// itemQuantity: 40,
// itemPrice: 17.99,
// itemSku: 8715309,
// },
// ],
// },
// // },
// ];
// const sampleNew = {
// id: "4",
// orderId: "o4",
// status: RECEIVED,
// };
// const getAllPromise = new Promise( (resolve, reject) => {
// resolve(sampleGetAll)
// })
// const createNewPromise = new Promise( (resolve, reject) => {
// resolve(sampleNew)
// })
// export const getOrders = () => {
// return getAllPromise;
// };
// export const createOrder = (order) => {
// return createNewPromise;
// }
export const getOrders =() => {
return axios.get(`http://localhost:8080/api/orders`);
}
......
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