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 { useCart } from '@lib/hooks/use-cart' import { Layout } from '@components/core' import { Button } from '@components/ui' import { Bag, Cross, Check } from '@components/icons' import { CartItem } from '@components/cart' import { Text } from '@components/ui' import CartSkeleton from '@components/cart/CartSkeleton' import CartEmpty from '@components/cart/CartEmpty' export async function getStaticProps({ preview, locale, }: GetStaticPropsContext) { const config = getConfig({ locale }) const { pages } = await getAllPages({ config, preview }) return { props: { pages }, } } export default function Cart() { const { items, isLoading, isError, isEmpty, subtotal, total, currency, } = useCart() return (