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.
20 lines
492 B
JavaScript
20 lines
492 B
JavaScript
5 years ago
|
import React from 'react'
|
||
|
import Router from 'next/router'
|
||
|
import ActionBar from '~/components/admin/actionBar'
|
||
|
import Table from '~/components/table'
|
||
|
import {DateTime} from 'luxon'
|
||
|
|
||
|
Order.getInitialProps = async ({ctx: {axios, query: {id}}}) => {
|
||
|
const {data: order} = await axios.get(`/api/orders/${id}`)
|
||
|
return {order}
|
||
|
}
|
||
|
|
||
|
export default function Order({order}){
|
||
|
return (
|
||
|
<>
|
||
|
<ActionBar title="Order Details"/>
|
||
|
<pre>{JSON.stringify(order, null, 2)}</pre>
|
||
|
</>
|
||
|
)
|
||
|
}
|