Commit 6791ba96 authored by Kevin Kaminski's avatar Kevin Kaminski

quick commit

parent b9b38e65
......@@ -7,10 +7,13 @@ const OrderIndexPage = () => {
let [orders, setOrders] = useState([]);
useEffect(() => {
OrderService.allOrders().then((res: any) => {
setOrders(res);
});
})
const apiUrl = 'http://localhost:8080/api/orders';
fetch(apiUrl).then((response) => response.json())
.then((data) => {
console.log('This is your data', data)
setOrders(data);
});
}, [])
// const orderDetailsArr = orders.map((order: any, idx: any) => {
......
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