You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
423 B
JavaScript

import {useEffect} from 'react'
import Router from 'next/router'
CheckoutComplete.getInitialProps = async function({ctx: {query: {session_id}, axios}}){
const {data: {status, order}} = await axios.post('/api/orders/current/checkout/verify', {session_id})
return {status, order}
}
export default function CheckoutComplete({status, order}){
return (
<pre>
{JSON.stringify(order, null, 2)}
</pre>
)
}