Frontend can retrieve current order
parent
9f270aeed5
commit
f409186bf9
@ -0,0 +1,15 @@
|
||||
CheckoutSummary.getInitialProps = async function({ctx: {axios}}){
|
||||
const {data: order} = await axios.get(`/api/orders/current`)
|
||||
return {order}
|
||||
}
|
||||
|
||||
export default function CheckoutSummary({order}){
|
||||
return (
|
||||
<>
|
||||
<h2>Checkout</h2>
|
||||
<pre>
|
||||
{JSON.stringify(order, null, 2)}
|
||||
</pre>
|
||||
</>
|
||||
)
|
||||
}
|
Loading…
Reference in New Issue