diff --git a/packages/next/src/components/HeadlessProvider.tsx b/packages/next/src/components/HeadlessProvider.tsx index 1e2803959..d22acefcc 100644 --- a/packages/next/src/components/HeadlessProvider.tsx +++ b/packages/next/src/components/HeadlessProvider.tsx @@ -27,8 +27,8 @@ export function HeadlessProvider>({ useHydrateCache, auth: { useHydrateCache: useAuthHydrateCache }, } = client; - const cacheSnapshot = pageProps[CLIENT_CACHE_PROP]; - const authSnapshot = pageProps[AUTH_CLIENT_CACHE_PROP]; + const cacheSnapshot = pageProps?.[CLIENT_CACHE_PROP]; + const authSnapshot = pageProps?.[AUTH_CLIENT_CACHE_PROP]; useHydrateCache({ cacheSnapshot: isNil(cacheSnapshot) ? undefined : cacheSnapshot, diff --git a/packages/next/src/export/index.ts b/packages/next/src/export/index.ts index 1564fb881..46279239e 100644 --- a/packages/next/src/export/index.ts +++ b/packages/next/src/export/index.ts @@ -1,7 +1,12 @@ -export * from '../gqty/client'; -export * from '../config/config'; -export * from '../server/getProps'; -export * from '../components/HeadlessProvider'; -export * from '../utils'; -export * from '../config/withFaust'; -export * from '../log/log'; +export { Config, WithFaustConfig, config, withFaust } from '../config'; +export { getClient, NextClient } from '../gqty'; +export { logQueries } from '../log'; +export { + GetNextServerSidePropsConfig, + GetNextStaticPropsConfig, + Is404Config, + getNextServerSideProps, + getNextStaticProps, + is404, +} from '../server'; +export { HeadlessProvider } from '../components';