/Orders.jsx Secret
Last active
October 21, 2022 05:47
Game shop project, Orders.jsx and Sales.jsx file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useEffect } from "react" | |
import { loadOrders } from "../Blockchain.Service" | |
import { useGlobalState } from "../store" | |
import Order from "../components/Order" | |
const Orders = () => { | |
const [orders] = useGlobalState('orders') | |
useEffect(async () => { | |
await loadOrders() | |
}, []) | |
return ( | |
<> | |
<Order orders={orders} title="Orders" /> | |
</> | |
) | |
} | |
export default Orders |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useEffect } from "react" | |
import { loadOrders } from "../Blockchain.Service" | |
import { useGlobalState } from "../store" | |
import Order from "../components/Order" | |
const Sales = () => { | |
const [orders] = useGlobalState('orders') | |
useEffect(async () => { | |
await loadOrders() | |
}, []) | |
return ( | |
<> | |
<Order orders={orders} title={'Sales'} seller /> | |
</> | |
) | |
} | |
export default Sales |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment