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 (
{JSON.stringify(order, null, 2)}) }