1
0
mirror of https://github.com/vercel/commerce.git synced 2025-07-22 12:24:18 +00:00
Files
assets
components
config
docs
lib
pages
api
product
[...pages].tsx
_app.tsx
blog.tsx
cart.tsx
index.tsx
orders.tsx
profile.tsx
search.tsx
wishlist.tsx
public
.editorconfig
.env.template
.gitignore
.prettierignore
README.md
global.d.ts
license.md
next-env.d.ts
next.config.js
package-lock.json
package.json
postcss.config.js
tailwind.config.js
tsconfig.json
yarn.lock
commerce/pages/orders.tsx
2020-11-04 11:50:23 -03:00

39 lines
1.3 KiB
TypeScript

import type { GetStaticPropsContext } from 'next'
import { getConfig } from '@bigcommerce/storefront-data-hooks/api'
import getAllPages from '@bigcommerce/storefront-data-hooks/api/operations/get-all-pages'
import { Layout } from '@components/common'
import { Container, Text } from '@components/ui'
import { Bag } from '@components/icons'
export async function getStaticProps({
preview,
locale,
}: GetStaticPropsContext) {
const config = getConfig({ locale })
const { pages } = await getAllPages({ config, preview })
return {
props: { pages },
}
}
export default function Orders() {
return (
<Container>
<Text variant="pageHeading">My Orders</Text>
<div className="flex-1 p-24 flex flex-col justify-center items-center ">
<span className="border border-dashed border-secondary rounded-full flex items-center justify-center w-16 h-16 p-12 bg-primary text-primary">
<Bag className="absolute" />
</span>
<h2 className="pt-6 text-2xl font-bold tracking-wide text-center">
No orders found
</h2>
<p className="text-accents-6 px-10 text-center pt-2">
Biscuit oat cake wafer icing ice cream tiramisu pudding cupcake.
</p>
</div>
</Container>
)
}
Orders.Layout = Layout