import type { GetStaticPropsContext } from 'next' import { Bag } from '@components/icons' import { Layout } from '@components/common' import { Button, Container, Text } from '@components/ui' import { getConfig } from '@framework/api' import getAllPages from '@framework/common/get-all-pages' import { useOrders } from '../framework/aquilacms/orders' export async function getStaticProps({ preview, locale, }: GetStaticPropsContext) { const config = getConfig({ locale }) const { pages } = await getAllPages({ config, preview }) return { props: { pages }, } } export default function Orders() { const { data: orders } = useOrders() return ( My Orders {orders?.length && (
{orders?.map((o) => (
{o.code}
{o.createdAt}
{o.price.currency} {o.price.value}
))}
)}
{!orders?.length && ( <>

No orders found

Biscuit oat cake wafer icing ice cream tiramisu pudding cupcake.

)}
) } Orders.Layout = Layout