import type { GetStaticPropsContext } from 'next' import getAllPages from '@lib/bigcommerce/api/operations/get-all-pages' import useCustomer from '@lib/bigcommerce/use-customer' import { Layout } from '@components/core' import { Container, Text } from '@components/ui' export async function getStaticProps({ preview }: GetStaticPropsContext) { const { pages } = await getAllPages({ preview }) return { props: { pages }, } } export default function Profile() { const { data } = useCustomer() return ( My Profile {data && (
Full Name {data.firstName} {data.lastName}
Email {data.email}
)}
) } Profile.Layout = Layout