commerce/pages/cart.tsx

29 lines
817 B
TypeScript
Raw Normal View History

2020-10-13 10:04:26 -03:00
import { GetStaticPropsContext, InferGetStaticPropsType } from 'next'
import getAllProducts from '@lib/bigcommerce/api/operations/get-all-products'
import { Layout } from '@components/core'
import { Container } from '@components/ui'
import getSiteInfo from '@lib/bigcommerce/api/operations/get-site-info'
export async function getStaticProps({ preview }: GetStaticPropsContext) {
const { products } = await getAllProducts()
const { categories, brands } = await getSiteInfo()
return {
props: { products, categories, brands },
}
}
export default function Home({}: InferGetStaticPropsType<
typeof getStaticProps
>) {
return (
<Container>
2020-10-15 16:00:11 -03:00
<h2 className="pt-1 pb-4 text-2xl leading-7 font-bold text-base tracking-wide">
2020-10-13 10:04:26 -03:00
My Cart
</h2>
</Container>
)
}
Home.Layout = Layout