diff --git a/packages/e2e/cypress.config.ts b/packages/e2e/cypress.config.ts index b9ac1c4b..6e702604 100644 --- a/packages/e2e/cypress.config.ts +++ b/packages/e2e/cypress.config.ts @@ -1,6 +1,7 @@ import { defineConfig } from 'cypress' -const basePath = process.env.BASE_PATH === '/' ? '' : process.env.BASE_PATH +const basePath = + process.env.BASE_PATH === '/' ? '' : process.env.BASE_PATH ?? '' export default defineConfig({ e2e: { diff --git a/packages/e2e/src/pages/pages/useQueryState/dynamic/[route]/index.tsx b/packages/e2e/src/pages/pages/useQueryState/dynamic/[route]/index.tsx index 18f718a3..4d880b5b 100644 --- a/packages/e2e/src/pages/pages/useQueryState/dynamic/[route]/index.tsx +++ b/packages/e2e/src/pages/pages/useQueryState/dynamic/[route]/index.tsx @@ -1,2 +1,16 @@ +import { GetServerSideProps } from 'next' +import { parseAsString } from 'next-usequerystate' import IntegrationPage from '../../index' export default IntegrationPage + +export const getServerSideProps = (async ctx => { + const string = parseAsString.parseServerSide(ctx.query.string) + console.dir({ string }) + return { + props: { + string + } + } +}) satisfies GetServerSideProps<{ + string: string | null +}> diff --git a/packages/e2e/src/pages/pages/useQueryState/index.tsx b/packages/e2e/src/pages/pages/useQueryState/index.tsx index ffdba36d..ad335935 100644 --- a/packages/e2e/src/pages/pages/useQueryState/index.tsx +++ b/packages/e2e/src/pages/pages/useQueryState/index.tsx @@ -35,7 +35,10 @@ const IntegrationPage = () => {

String

-