29 lines
828 B
TypeScript
29 lines
828 B
TypeScript
// src/pages/dashboard/order/details.tsx
|
|
//
|
|
import { useGetPartyOrder } from 'src/actions/party-order';
|
|
import { CONFIG } from 'src/global-config';
|
|
import { useParams } from 'src/routes/hooks';
|
|
import { PartyOrderDetailsView } from 'src/sections/party-order/view';
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
const metadata = { title: `Order details | Dashboard - ${CONFIG.appName}` };
|
|
|
|
export default function Page() {
|
|
const { id = '' } = useParams();
|
|
|
|
// const currentOrder = _orders.find((order) => order.id === id);
|
|
// TODO: error handling
|
|
const { partyOrder, partyOrderLoading, partyOrderError } = useGetPartyOrder(id);
|
|
|
|
if (!partyOrder) return <></>;
|
|
|
|
return (
|
|
<>
|
|
<title>{metadata.title}</title>
|
|
|
|
<PartyOrderDetailsView partyOrder={partyOrder} />
|
|
</>
|
|
);
|
|
}
|