import { PageOptions } from '@graphcommerce/framer-next-pages' import { ResetPasswordForm } from '@graphcommerce/magento-customer' import { PageMeta, StoreConfigDocument } from '@graphcommerce/magento-store' import { AppShellTitle, Button, GetStaticProps, SheetShellHeader, Title, } from '@graphcommerce/next-ui' import { Box, Container, Link, NoSsr } from '@material-ui/core' import router, { useRouter } from 'next/router' import React from 'react' import SheetShell, { SheetShellProps } from '../../../../components/AppShell/SheetShell' import apolloClient from '../../../../lib/apolloClient' type GetPageStaticProps = GetStaticProps function CustomerAccountCreatePasswordPage() { const { query } = useRouter() const { token, success } = query if (typeof token !== 'undefined' && success === 'undefined') return <> return ( <> {!success ? 'Set your new password' : 'You have now successfully reset your password'} {!success && ( Set your new password

Fill in your new password, confirm it and click on the save button.

)} {success && ( You have now successfully reset your password

You can now{' '} sign in again .

)}
) } const pageOptions: PageOptions = { overlayGroup: 'account-public', SharedComponent: SheetShell, } CustomerAccountCreatePasswordPage.pageOptions = pageOptions export default CustomerAccountCreatePasswordPage export const getStaticProps: GetPageStaticProps = async ({ locale }) => { const client = apolloClient(locale, true) const conf = client.query({ query: StoreConfigDocument }) return { props: { apolloState: await conf.then(() => client.cache.extract()), variant: 'bottom', size: 'max', backFallbackHref: '/account/signin', backFallbackTitle: 'Sign In', }, } }