import type { GetStaticPropsContext } from 'next' import { getConfig } from '@framework/api' import getAllPages from '@framework/api/operations/get-all-pages' import useCart from '@framework/cart/use-cart' import usePrice from '@framework/product/use-price' import { Layout } from '@components/common' import { Button } from '@components/ui' import { Bag, Cross, Check } from '@components/icons' import { CartItem } from '@components/cart' import { Text } from '@components/ui' 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 { data, isEmpty } = useCart() const loading = !data if (loading) { // Load skeleton return
Biscuit oat cake wafer icing ice cream tiramisu pudding cupcake.