import { PageOptions } from '@graphcommerce/framer-next-pages' import { CartItemSummary, CartSummary } from '@graphcommerce/magento-cart' import { InlineAccount } from '@graphcommerce/magento-customer' import { SignupNewsletter } from '@graphcommerce/magento-newsletter' import { PageMeta, StoreConfigDocument } from '@graphcommerce/magento-store' import { AppShellTitle, Button, GetStaticProps, iconParty, PageShellHeader, Stepper, Title, } from '@graphcommerce/next-ui' import { Box, Container } from '@material-ui/core' import PageLink from 'next/link' import React from 'react' import { FullPageShellProps } from '../../components/AppShell/FullPageShell' import MinimalPageShell, { MinimalPageShellProps } from '../../components/AppShell/MinimalPageShell' import { DefaultPageDocument } from '../../components/GraphQL/DefaultPage.gql' import apolloClient from '../../lib/apolloClient' type Props = Record type GetPageStaticProps = GetStaticProps function OrderSuccessPage() { return ( <> } > Thank you for your order! Thank you for your order! ) } const pageOptions: PageOptions = { overlayGroup: 'checkout', SharedComponent: MinimalPageShell, sharedKey: () => 'checkout', } OrderSuccessPage.pageOptions = pageOptions export default OrderSuccessPage export const getStaticProps: GetPageStaticProps = async ({ locale }) => { const client = apolloClient(locale, true) const staticClient = apolloClient(locale) const conf = client.query({ query: StoreConfigDocument }) const page = staticClient.query({ query: DefaultPageDocument, variables: { url: `checkout/success`, rootCategory: (await conf).data.storeConfig?.root_category_uid ?? '', }, }) return { props: { ...(await page).data, apolloState: await conf.then(() => client.cache.extract()), }, } }